summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/common/handlers/main.yml3
-rw-r--r--roles/common/tasks/clamav.yml10
2 files changed, 13 insertions, 0 deletions
diff --git a/roles/common/handlers/main.yml b/roles/common/handlers/main.yml
index 3dbbf90..a852c4d 100644
--- a/roles/common/handlers/main.yml
+++ b/roles/common/handlers/main.yml
@@ -32,20 +32,23 @@
- name: Restart ntp
service: name=ntp state=restarted
- name: Restart Postfix
service: name=postfix state=restarted
- name: Reload Postfix
service: name=postfix state=reloaded
- name: Restart stunnel
service: name=stunnel4 pattern=/usr/bin/stunnel4 state=restarted
- name: Restart bacula-fd
service: name=bacula-fd state=restarted
- name: Update certificate
command: update-ca-certificates
- name: Restart munin-node
service: name=munin-node state=restarted
+
+- name: Restart freshclam
+ service: name=clamav-freshclam state=restarted
diff --git a/roles/common/tasks/clamav.yml b/roles/common/tasks/clamav.yml
index f66689c..e1ece0d 100644
--- a/roles/common/tasks/clamav.yml
+++ b/roles/common/tasks/clamav.yml
@@ -1,12 +1,22 @@
- name: Install ClamAV
apt: pkg={{ item }}
with_items:
- clamav
- clamav-daemon
- clamav-freshclam
+- name: Configure FreshClam
+ lineinfile: "dest=/etc/clamav/freshclam.conf
+ line='DatabaseMirror {{ item }}'"
+ with_items:
+ - db.local.clamav.net
+ - database.clamav.net
+ - db.other.clamav.net
+ notify:
+ - Restart freshclam
+
- name: Start ClamAV
service: name={{ item }} state=started
with_items:
- clamav-daemon
- clamav-freshclam