Blame ansible/roles/pagure-dev/tasks/clamav.yml

Jeremy Cline 4e3668
---
Jeremy Cline 4e3668
Jeremy Cline 4e3668
- name: Install ClamAV packages
Jeremy Cline 4e3668
  dnf: name={{ item }} state=present
Jeremy Cline 4e3668
  with_items:
Jeremy Cline 4e3668
    - clamav-data-empty
Jeremy Cline 4e3668
    - clamav-server
Jeremy Cline 4e3668
    - clamav-server-systemd
Jeremy Cline 4e3668
    - clamav-update
Jeremy Cline 4e3668
Jeremy Cline 4e3668
- name: Configure freshclam
Jeremy Cline 4e3668
  replace:
Jeremy Cline 4e3668
    dest: /etc/freshclam.conf
Jeremy Cline 4e3668
    regexp: "Example*"
Jeremy Cline 4e3668
    replace: ""
Jeremy Cline 4e3668
Jeremy Cline 4e3668
- name: Install Pagure's ClamAV configuration
Jeremy Cline 4e3668
  copy:
Jeremy Cline 4e3668
    src: clamd.conf
Jeremy Cline 4e3668
    dest: /etc/clamd.d/pagure.conf
Jeremy Cline 4e3668
Jeremy Cline 4e3668
# pyclamd expects /etc/clamd.conf
Jeremy Cline 4e3668
- name: Link /etc/clamd.conf to our pagure config
Jeremy Cline 4e3668
  file: src=/etc/clamd.d/pagure.conf dest=/etc/clamd.conf state=link
Jeremy Cline 4e3668
Jeremy Cline 4e3668
- name: Download latest ClamAV database
Jeremy Cline 4e3668
  command: freshclam
Jeremy Cline 4e3668
Jeremy Cline 4e3668
- name: Start ClamAV
Jeremy Cline 4e3668
  service: name=clamd@pagure state=started enabled=yes