2016-11-17 13:41:44 +13:00
|
|
|
---
|
|
|
|
|
- name: Ensure Dynamic MOTD Script is in place
|
2018-07-12 16:31:27 +12:00
|
|
|
template:
|
2016-11-17 13:41:44 +13:00
|
|
|
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
|