diff --git a/library/roles/clamav/tasks/main.yml b/library/roles/clamav/tasks/main.yml index 7c94f0b..78c9b57 100644 --- a/library/roles/clamav/tasks/main.yml +++ b/library/roles/clamav/tasks/main.yml @@ -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