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

Jeremy Cline 4e3668
---
Jeremy Cline 4e3668
Jeremy Cline 4e3668
- name: Install ClamAV packages
Karsten Hopp f81cdc
  dnf:
Karsten Hopp f81cdc
    name:
Karsten Hopp f81cdc
      - clamav-data-empty
Karsten Hopp f81cdc
      - clamav-server
Karsten Hopp f81cdc
      - clamav-server-systemd
Karsten Hopp f81cdc
      - clamav-update
Karsten Hopp f81cdc
    state: present
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
Karsten Hopp f81cdc
  ignore_errors: yes
Jeremy Cline 4e3668
Jeremy Cline 4e3668
- name: Start ClamAV
Jeremy Cline 4e3668
  service: name=clamd@pagure state=started enabled=yes