- name: Install ClamAV apt: pkg={{ item }} with_items: - clamav - clamav-daemon - clamav-freshclam - name: Configure FreshClam template: src=etc/clamav/freshclam.conf.j2 dest=/etc/clamav/freshclam.conf owner=clamav group=adm mode=0444 tags: freshclam notify: - Restart freshclam - name: Start ClamAV service: name={{ item }} state=started with_items: - clamav-daemon - clamav-freshclam - name: Add a 'clamav' alias lineinfile: dest=/etc/aliases create=yes regexp="^clamav{{':'}} " line="clamav{{':'}} root" - name: Compile the static local Postfix database postmap: cmd=postalias src=/etc/aliases db=cdb owner=root group=root mode=0644