Force a restart after a clamd reconfiguration. clamupdate must be added to the clamscan group.

This commit is contained in:
Andrea Dell'Amico 2020-01-14 18:49:26 +02:00
parent a411c8d68b
commit 0085eaac94
1 changed files with 4 additions and 1 deletions

View File

@ -20,7 +20,7 @@
block:
- name: Install the clamd configuration
template: src=scan.conf.j2 dest={{ clamav_clamd_conf_file }} owner=root group=root mode=0444
notify: Reload clamd
notify: Restart clamd
- name: Install the freshclam configuration
template: src=freshclam.conf.j2 dest=/etc/freshclam.conf owner=root group=root mode=0400
@ -28,6 +28,9 @@
- name: Change the /var/lib/clamav permissions so that freshclam can write into it
file: dest=/var/lib/clamav state=directory owner=clamscan group=clamupdate mode='u=rwx,g=rwsx,o=rx'
- name: Add the clamupdate user to the clamscan group so that it can update the signatures
user: name=clamupdate groups=clamscan append=yes
- name: Ensure that the clamd service is running and enabled
service: name=clamd@scan state=started enabled=yes