- name: Update APT Cache
  apt:
    update_cache: yes
  ignore_errors: yes

- name: Update ClamAV and related packages so updating of virus definitions work
  apt:
    pkg:
      - clamav
      - clamav-base
    state:
      latest

- name: Disable automatic update of virus definitions
  service:
    name: clamav-freshclam
    state: stopped
    enabled: no

- name: Update freshclam
  command: freshclam
  async: 3600
  poll: 5

- name: Scan home directory
  command: 'clamscan --max-filesize=10M --max-scansize=10M --infected --recursive=yes /home'
  async: 32000
  poll: 300
