Refactored to individual files by function

This commit is contained in:
2016-11-17 13:41:44 +13:00
parent a1ac1de7e2
commit 2111038879
4 changed files with 142 additions and 149 deletions

19
tasks/motd.yml Normal file
View File

@@ -0,0 +1,19 @@
---
- name: Ensure Dynamic MOTD Script is in place
copy:
src: dynmotd
dest: /usr/local/bin/dynmotd
mode: a+x
- name: Remove Dynamic MOTD in profile if present
lineinfile:
dest: /etc/profile
regexp: "^/usr/local/bin/dynmotd"
state: absent
- name: Configure Dynamic MOTD in profile.d
lineinfile:
dest: /etc/profile.d/motd.sh
regexp: "^/usr/local/bin/dynmotd"
line: "/usr/local/bin/dynmotd"
create: yes