]> git.phdru.name Git - ansible.git/commitdiff
Feat(debian/email): Configure `/etc/default/spamassassin`
authorOleg Broytman <phd@phdru.name>
Fri, 11 Mar 2022 00:56:24 +0000 (03:56 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 11 Mar 2022 01:04:50 +0000 (04:04 +0300)
Add `--socketpath`.

playbooks/roles/debian/email/tasks/main.yml

index 0ecc3a8e6c2d8d8581b77dedaa23c9e4ccffa342..ccf18cc3eb4c279c30e26c57ec997a644db37aa5 100644 (file)
@@ -6,3 +6,18 @@
     name: ['exim4', 'spamassassin', 'spamc']
     state: latest
     update_cache: yes
+
+- name: Configure /etc/default/spamassassin
+  become: true
+  replace:
+    path: /etc/default/spamassassin
+    regexp: '^OPTIONS="--create-prefs --max-children 5 --helper-home-dir"$'
+    replace: 'OPTIONS="--create-prefs --max-children 5 --helper-home-dir --socketpath=/tmp/spamassassin.sock"'
+  notify: Restart spamassassin
+
+handlers:
+  - name: Restart spamassassin
+    become: true
+    service:
+      name: spamassassin
+      state: reloaded