Refs #8025 Rol debian-base. Task relayhost fix and handler exim update config.

This commit is contained in:
Xavi Lleó 2024-10-08 12:34:52 +02:00
parent f6bef9c98a
commit 88c47d3c3a
2 changed files with 5 additions and 3 deletions

View File

@ -19,4 +19,4 @@
- name: reconfigure tzdata
command: dpkg-reconfigure -f noninteractive tzdata
- name: update exim configuration
command: update-exim4.conf
command: /usr/sbin/update-exim4.conf

View File

@ -20,8 +20,10 @@
mode: '0644'
notify: update exim configuration
register: exim_config
- name: Force execution of handlers immediately
meta: flush_handlers
- name: Sending mail to verify relay host configuration works
shell: >
echo "If you see this message, relayhost on {{ ansible_fqdn }} has been configured correctly." \
sleep 2; echo "If you see this message, relayhost on {{ ansible_fqdn }} has been configured correctly." \
| mailx -s "Relayhost test for {{ ansible_fqdn }}" "{{ sysadmin_mail }}"
when: exim_config.changed
when: exim_config.changed