git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/nano.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/nano.yml')
-rw-r--r--ansible/nano.yml24
1 files changed, 24 insertions, 0 deletions
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