Files
ansible-role-common/tasks/motd.yml

19 lines
447 B
YAML

---
- 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