Handler improvements
This commit is contained in:
		| @@ -11,7 +11,7 @@ | |||||||
|     - ensure_clamav is defined |     - ensure_clamav is defined | ||||||
|   ansible.builtin.systemd: |   ansible.builtin.systemd: | ||||||
|     daemon_reload: 'yes' |     daemon_reload: 'yes' | ||||||
| - name: 'ensure_clamav.services' | - name: 'ensure_clamav.service_restart' | ||||||
|   when: |   when: | ||||||
|     - ansible_system == 'Linux' |     - ansible_system == 'Linux' | ||||||
|     - ensure_clamav is defined |     - ensure_clamav is defined | ||||||
| @@ -25,4 +25,5 @@ | |||||||
|   loop: '{{ ensure_clamav.service_list }}' |   loop: '{{ ensure_clamav.service_list }}' | ||||||
|   loop_control: |   loop_control: | ||||||
|     label: '{{ item.name }} will be restarted' |     label: '{{ item.name }} will be restarted' | ||||||
|  | ... | ||||||
|  |  | ||||||
|   | |||||||
| @@ -45,6 +45,11 @@ | |||||||
|   loop: '{{ ensure_clamav.sysctl_list }}' |   loop: '{{ ensure_clamav.sysctl_list }}' | ||||||
|   loop_control: |   loop_control: | ||||||
|     label: '{{ item.name }} will be {{ item.value }}' |     label: '{{ item.name }} will be {{ item.value }}' | ||||||
|  |   notify: | ||||||
|  |     - 'ensure_clamav.package_facts' | ||||||
|  |     - 'ensure_clamav.service_facts' | ||||||
|  |     - 'ensure_clamav.service_reload' | ||||||
|  |     - 'ensure_clamav.service_restart' | ||||||
| - name: 'ensure packages' | - name: 'ensure packages' | ||||||
|   when: |   when: | ||||||
|     - ansible_system == 'Linux' |     - ansible_system == 'Linux' | ||||||
| @@ -60,6 +65,8 @@ | |||||||
|   notify: |   notify: | ||||||
|     - 'ensure_clamav.package_facts' |     - 'ensure_clamav.package_facts' | ||||||
|     - 'ensure_clamav.service_facts' |     - 'ensure_clamav.service_facts' | ||||||
|  |     - 'ensure_clamav.service_reload' | ||||||
|  |     - 'ensure_clamav.service_restart' | ||||||
| - name: 'ensure seboolean' | - name: 'ensure seboolean' | ||||||
|   when: |   when: | ||||||
|     - ansible_system == 'Linux' |     - ansible_system == 'Linux' | ||||||
| @@ -73,6 +80,11 @@ | |||||||
|   loop: '{{ ensure_clamav.seboolean_list }}' |   loop: '{{ ensure_clamav.seboolean_list }}' | ||||||
|   loop_control: |   loop_control: | ||||||
|     label: '{{ item.name }} will be {{ item.state }}' |     label: '{{ item.name }} will be {{ item.state }}' | ||||||
|  |   notify: | ||||||
|  |     - 'ensure_clamav.package_facts' | ||||||
|  |     - 'ensure_clamav.service_facts' | ||||||
|  |     - 'ensure_clamav.service_reload' | ||||||
|  |     - 'ensure_clamav.service_restart' | ||||||
| - name: 'ensure quarantine directory' | - name: 'ensure quarantine directory' | ||||||
|   when: |   when: | ||||||
|     - ansible_system == 'Linux' |     - ansible_system == 'Linux' | ||||||
| @@ -105,7 +117,7 @@ | |||||||
|     - 'ensure_clamav.package_facts' |     - 'ensure_clamav.package_facts' | ||||||
|     - 'ensure_clamav.service_facts' |     - 'ensure_clamav.service_facts' | ||||||
|     - 'ensure_clamav.service_reload' |     - 'ensure_clamav.service_reload' | ||||||
|     - 'ensure_clamav.services' |     - 'ensure_clamav.service_restart' | ||||||
| - name: 'ensure services' | - name: 'ensure services' | ||||||
|   when: |   when: | ||||||
|     - ansible_system == 'Linux' |     - ansible_system == 'Linux' | ||||||
| @@ -155,4 +167,5 @@ | |||||||
|     label: '{{ item.path }} to be removed' |     label: '{{ item.path }} to be removed' | ||||||
| - name: 'flush handlers' | - name: 'flush handlers' | ||||||
|   meta: 'flush_handlers' |   meta: 'flush_handlers' | ||||||
|  | ... | ||||||
|  |  | ||||||
|   | |||||||
| @@ -684,6 +684,7 @@ User clamscan | |||||||
| # Set the exclude paths. All subdirectories are also excluded. | # Set the exclude paths. All subdirectories are also excluded. | ||||||
| # Default: disabled | # Default: disabled | ||||||
| #OnAccessExcludePath /home/user | #OnAccessExcludePath /home/user | ||||||
|  | OnAccessExcludePath /etc/selinux | ||||||
| {% if quarantine_directory is defined %} | {% if quarantine_directory is defined %} | ||||||
| OnAccessExcludePath {{ quarantine_directory }} | OnAccessExcludePath {{ quarantine_directory }} | ||||||
| {% endif %} | {% endif %} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user