clamav: explicitly wipe the scamnailer db file.

This commit is contained in:
Andrea Dell'Amico 2020-04-29 14:23:53 +02:00
parent 8dfab517e6
commit 43b871663c
2 changed files with 12 additions and 1 deletions

View File

@ -55,6 +55,9 @@ clamav_additional_signatures_proxy_host: ''
clamav_additional_signatures_proxy_port: 3128
clamav_additional_signatures_proxy_user: ''
clamav_additional_signatures_proxy_pwd: ''
clamav_additional_signatures_db_dir: '/var/lib/clamav-unofficial-sigs'
clamav_additional_signatures_dbs_to_wipe:
- 'dbs-ss/scamnailer.ndb'
# Freshclam
clamav_freshclam_check_frequency: 12

View File

@ -44,9 +44,17 @@
with_items:
- os.conf
- user.conf
- name: Wipe some unofficial signature files that are broken. Disabling them seems not enough
copy: content="" dest={{ clamav_additional_signatures_db_dir }}/{{ item }} force=yes
with_items: '{{ clamav_additional_signatures_dbs_to_wipe }}'
notify: Restart clamd
- name: Install a cron job that wipes the wrong signature files, just in case they reappear after an update
cron: name="Wipe some unofficial clamav signature dbs that are broken" user=root special_time=hourly job="{% for db in clamav_additional_signatures_dbs_to_wipe %}echo '' > {{ clamav_additional_signatures_db_dir }}/{{ db }}{% if not loop.last %}; {% endif %}{% endfor %}"
when: clamav_unofficial_sigs_install | bool
tags: [ 'clamav', 'clamav_clamd', 'clamav_config' ]
tags: [ 'clamav', 'clamav_clamd', 'clamav_config', 'clamav_unofficial_sigs' ]
- name: Configure clamav milter
block: