summaryrefslogtreecommitdiffstats
path: root/roles/IMAP
diff options
context:
space:
mode:
Diffstat (limited to 'roles/IMAP')
-rw-r--r--roles/IMAP/tasks/spam.yml9
1 files changed, 6 insertions, 3 deletions
diff --git a/roles/IMAP/tasks/spam.yml b/roles/IMAP/tasks/spam.yml
index d326656..e3baca0 100644
--- a/roles/IMAP/tasks/spam.yml
+++ b/roles/IMAP/tasks/spam.yml
@@ -28,12 +28,15 @@
notify:
- Restart Amavis
-- name: Ensure SpamAssassin is not auto-started at boot time
+- name: Provision /etc/default/spamassassin
lineinfile: dest=/etc/default/spamassassin
- regexp='^(\s*#)?\s*ENABLED='
- line='ENABLED=0'
+ regexp='^(\s*#)?\s*{{ item.var }}='
+ "line={{ item.var }}={{ item.value }}"
owner=root group=root
mode=0644
+ with_items:
+ - { var: ENABLED, value: 0 }
+ - { var: CRON, value: 1 }
- name: Create a 'amavis' SQL user
# This *must* be the user we run spamd as