This commit is contained in:
2024-12-19 22:44:32 +01:00
parent f61e2ff73c
commit c9cee6deae
17 changed files with 714 additions and 72 deletions

View File

@ -0,0 +1,19 @@
---
# ----------
# /etc/motd
# ----------
- name: (motd.yml) Check if /etc/motd.ORIG exist
stat:
path: /etc/motd.ORIG
register: motd_orig_exist
- name: (motd.yml) Backup existing file /etc/motd
command: cp -a /etc/motd /etc/motd.ORIG
when: motd_orig_exist.stat.exists == False
- name: (motd.yml) create /etc/motd
shell: figlet {{ ansible_hostname }} > /etc/motd
when: motd_orig_exist.stat.exists == False