Files
ansible-role-common/tasks/motd.yml
2022-04-03 13:20:47 +12:00

20 lines
452 B
YAML

---
- name: Ensure Dynamic MOTD Script is in place
template:
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