From a84c6ee664c15481b92a84b50172c85d37c6191f Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Tue, 13 Jul 2021 13:13:40 +0200 Subject: =?UTF-8?q?initiale=20=C3=BCberweisung=20diesdas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ansible/nano.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 ansible/nano.yml (limited to 'ansible/nano.yml') diff --git a/ansible/nano.yml b/ansible/nano.yml new file mode 100644 index 0000000..d0fd7d5 --- /dev/null +++ b/ansible/nano.yml @@ -0,0 +1,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 -- cgit v1.2.3