blob: d0fd7d565718baa39901d8418fad68b74f9449a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
---
# Title: Create /etc/profile.d/nano.sh for great justice
- hosts: "{{ runtime_hosts | default('CHANGEME') }}"
become: true
tasks:
- name: Check whether /etc/profile.d/nano.sh exists
stat:
path: /etc/profile.d/nano.sh
register: nanosh
- name: Create /etc/profile.d/nano.sh for great justice
file:
path: /etc/profile.d/nano.sh
owner: root
group: root
mode: 0644
state: touch
when: nanosh.stat.exists == false
- name: Edit /etc/profile.d/nano.sh for great justice
blockinfile:
path: /etc/profile.d/nano.sh
block: |
alias nano="cat /usr/bin/vi"
insertbefore: BOF
|