update_motd: use update_motd dict

pull/71/head
Alexandre Iooss 3 years ago
parent 00d63cf082
commit b82afd13d9

@ -1,7 +1,13 @@
---
- hosts: perceval.adm.auro.re
vars:
update_motd:
borgbackup_server: >-
Les sauvegardes (borg) sont stockées dans
{{ borg_server_backups_dir }}.
roles:
- borgbackup_server
- update_motd
- hosts: all,!unifi,!unifi-*,!wiki.adm.auro.re
roles:

@ -43,12 +43,12 @@
- name: Install additional motd messages
copy:
content: "✨ {{ item.message }}\n"
content: "✨ {{ item.value }}\n"
dest: "/etc/motd-messages/{{ item.key }}"
mode: u=rwx,g=rx,o=rx
mode: u=rw,g=r,o=r
owner: root
group: root
loop: "{{ motd_messages }}"
loop: "{{ update_motd | dict2items }}"
notify: Remove cached motd
when: motd_messages is defined
when: update_motd is defined
...

Loading…
Cancel
Save