If anything changes, notify all handlers
This commit is contained in:
		| @@ -45,6 +45,11 @@ | |||||||
|   loop: '{{ ensure_dovecot.sysctl_list }}' |   loop: '{{ ensure_dovecot.sysctl_list }}' | ||||||
|   loop_control: |   loop_control: | ||||||
|     label: '{{ item.name }} will be {{ item.value }}' |     label: '{{ item.name }} will be {{ item.value }}' | ||||||
|  |   notify: | ||||||
|  |     - 'ensure_dovecot.package_facts' | ||||||
|  |     - 'ensure_dovecot.service_facts' | ||||||
|  |     - 'ensure_dovecot.service_reload' | ||||||
|  |     - 'ensure_dovecot.services' | ||||||
| - name: 'ensure packages' | - name: 'ensure packages' | ||||||
|   when: |   when: | ||||||
|     - ansible_system == 'Linux' |     - ansible_system == 'Linux' | ||||||
| @@ -61,6 +66,8 @@ | |||||||
|   notify: |   notify: | ||||||
|     - 'ensure_dovecot.package_facts' |     - 'ensure_dovecot.package_facts' | ||||||
|     - 'ensure_dovecot.service_facts' |     - 'ensure_dovecot.service_facts' | ||||||
|  |     - 'ensure_dovecot.service_reload' | ||||||
|  |     - 'ensure_dovecot.services' | ||||||
| - name: 'ensure seboolean' | - name: 'ensure seboolean' | ||||||
|   when: |   when: | ||||||
|     - ansible_system == 'Linux' |     - ansible_system == 'Linux' | ||||||
| @@ -74,15 +81,11 @@ | |||||||
|   loop: '{{ ensure_dovecot.seboolean_list }}' |   loop: '{{ ensure_dovecot.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_dovecot.package_facts' | ||||||
|     - ansible_system == 'Linux' |     - 'ensure_dovecot.service_facts' | ||||||
|     - ensure_dovecot is defined |     - 'ensure_dovecot.service_reload' | ||||||
|     - ensure_dovecot.template_list is defined |     - 'ensure_dovecot.services' | ||||||
|     - ensure_dovecot.template_list is iterable |  | ||||||
|   ansible.builtin.file: |  | ||||||
|     path: '/etc/dovecot/certificates' |  | ||||||
|     state: 'directory' |  | ||||||
| - name: 'ensure configurations' | - name: 'ensure configurations' | ||||||
|   when: |   when: | ||||||
|     - ansible_system == 'Linux' |     - ansible_system == 'Linux' | ||||||
| @@ -123,6 +126,11 @@ | |||||||
|   loop: '{{ ensure_dovecot.firewall_list }}' |   loop: '{{ ensure_dovecot.firewall_list }}' | ||||||
|   loop_control: |   loop_control: | ||||||
|     label: '{{ item.service }} will be {{ item.state }}' |     label: '{{ item.service }} will be {{ item.state }}' | ||||||
|  |   notify: | ||||||
|  |     - 'ensure_dovecot.package_facts' | ||||||
|  |     - 'ensure_dovecot.service_facts' | ||||||
|  |     - 'ensure_dovecot.service_reload' | ||||||
|  |     - 'ensure_dovecot.services' | ||||||
| - name: 'ensure services' | - name: 'ensure services' | ||||||
|   when: |   when: | ||||||
|     - ansible_system == 'Linux' |     - ansible_system == 'Linux' | ||||||
| @@ -139,5 +147,7 @@ | |||||||
|   notify: |   notify: | ||||||
|     - 'ensure_dovecot.package_facts' |     - 'ensure_dovecot.package_facts' | ||||||
|     - 'ensure_dovecot.service_facts' |     - 'ensure_dovecot.service_facts' | ||||||
|  |     - 'ensure_dovecot.service_reload' | ||||||
|  |     - 'ensure_dovecot.services' | ||||||
| - name: 'flush handlers' | - name: 'flush handlers' | ||||||
|   meta: 'flush_handlers' |   meta: 'flush_handlers' | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user