If anything changes, notify all handlers

This commit is contained in:
Jason Rothstein 2022-01-30 21:38:09 -06:00
parent 8acf75dc15
commit 15d5568b32

View File

@ -45,6 +45,11 @@
loop: '{{ ensure_postfix.sysctl_list }}' loop: '{{ ensure_postfix.sysctl_list }}'
loop_control: loop_control:
label: '{{ item.name }} will be {{ item.value }}' label: '{{ item.name }} will be {{ item.value }}'
notify:
- 'ensure_postfix.package_facts'
- 'ensure_postfix.service_facts'
- 'ensure_postfix.service_reload'
- 'ensure_postfix.services'
- name: 'ensure packages' - name: 'ensure packages'
when: when:
- ansible_system == 'Linux' - ansible_system == 'Linux'
@ -61,6 +66,8 @@
notify: notify:
- 'ensure_postfix.package_facts' - 'ensure_postfix.package_facts'
- 'ensure_postfix.service_facts' - 'ensure_postfix.service_facts'
- 'ensure_postfix.service_reload'
- 'ensure_postfix.services'
- name: 'ensure seboolean' - name: 'ensure seboolean'
when: when:
- ansible_system == 'Linux' - ansible_system == 'Linux'
@ -74,15 +81,11 @@
loop: '{{ ensure_postfix.seboolean_list }}' loop: '{{ ensure_postfix.seboolean_list }}'
loop_control: loop_control:
label: '{{ item.name }} will be {{ item.state }}' label: '{{ item.name }} will be {{ item.state }}'
- name: 'mkdir certificates' notify:
when: - 'ensure_postfix.package_facts'
- ansible_system == 'Linux' - 'ensure_postfix.service_facts'
- ensure_postfix is defined - 'ensure_postfix.service_reload'
- ensure_postfix.template_list is defined - 'ensure_postfix.services'
- ensure_postfix.template_list is iterable
ansible.builtin.file:
path: '/etc/postfix/certificates'
state: 'directory'
- name: 'ensure configurations' - name: 'ensure configurations'
when: when:
- ansible_system == 'Linux' - ansible_system == 'Linux'
@ -123,6 +126,11 @@
loop: '{{ ensure_postfix.firewall_list }}' loop: '{{ ensure_postfix.firewall_list }}'
loop_control: loop_control:
label: '{{ item.service }} will be {{ item.state }}' label: '{{ item.service }} will be {{ item.state }}'
notify:
- 'ensure_postfix.package_facts'
- 'ensure_postfix.service_facts'
- 'ensure_postfix.service_reload'
- 'ensure_postfix.services'
- name: 'ensure services' - name: 'ensure services'
when: when:
- ansible_system == 'Linux' - ansible_system == 'Linux'