]> git.phdru.name Git - ansible.git/commitdiff
Fix(debian/email): Split handlers
authorOleg Broytman <phd@phdru.name>
Mon, 25 Apr 2022 12:10:46 +0000 (15:10 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 25 Apr 2022 12:10:46 +0000 (15:10 +0300)
Roles don't allow inline handlers.

playbooks/roles/debian/email/handlers/main.yml [new file with mode: 0644]
playbooks/roles/debian/email/tasks/main.yml

diff --git a/playbooks/roles/debian/email/handlers/main.yml b/playbooks/roles/debian/email/handlers/main.yml
new file mode 100644 (file)
index 0000000..3bb8061
--- /dev/null
@@ -0,0 +1,5 @@
+- name: Restart spamassassin
+  become: true
+  service:
+    name: spamassassin
+    state: reloaded
index ccf18cc3eb4c279c30e26c57ec997a644db37aa5..987a988a1d6b4d0f331df722323c1a5d3fbf03e4 100644 (file)
     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
     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