This commit is contained in:
2025-01-21 16:53:58 +01:00
parent c9cee6deae
commit 5fe32c6473
25 changed files with 717 additions and 573 deletions

View File

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