Ensure the quarantine directory exists
This commit is contained in:
		| @@ -1,2 +1,4 @@ | ||||
| --- | ||||
| # defaults file for ensure_clamav | ||||
| quarantine_directory: '/root/quarantine' | ||||
|  | ||||
|   | ||||
| @@ -74,6 +74,14 @@ | ||||
|   loop: '{{ ensure_clamav.seboolean_list }}' | ||||
|   loop_control: | ||||
|     label: '{{ item.name }} will be {{ item.state }}' | ||||
| - name: 'ensure quarantine directory' | ||||
|   when: | ||||
|     - ansible_system == 'Linux' | ||||
|     - ensure_clamav is defined | ||||
|     - quarantine_directory is defined | ||||
|   ansible.builtin.file: | ||||
|     path: '{{ quarantine_directory }}' | ||||
|     state: 'directory' | ||||
| - name: 'ensure configurations' | ||||
|   when: | ||||
|     - ansible_system == 'Linux' | ||||
|   | ||||
| @@ -9,7 +9,7 @@ After=clamd@scan.service syslog.target network.target | ||||
| [Service] | ||||
| Type=simple | ||||
| User=root | ||||
| ExecStart=/usr/sbin/clamonacc -F --config-file=/etc/clamd.d/scan.conf --move=/root/quarantine/ --fdpass | ||||
| ExecStart=/usr/sbin/clamonacc -F --config-file=/etc/clamd.d/scan.conf --move={{ quarantine_directory }} --fdpass | ||||
|  | ||||
| [Install] | ||||
| WantedBy=multi-user.target | ||||
|   | ||||
		Reference in New Issue
	
	Block a user