Ensure the quarantine directory exists
This commit is contained in:
parent
599d2c922b
commit
33f99de4fe
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user