From b62f3ffe06cb03c9f93d4c160f315875c6058e1c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 25 Apr 2022 15:10:46 +0300 Subject: [PATCH] Fix(debian/email): Split handlers Roles don't allow inline handlers. --- playbooks/roles/debian/email/handlers/main.yml | 5 +++++ playbooks/roles/debian/email/tasks/main.yml | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) create mode 100644 playbooks/roles/debian/email/handlers/main.yml diff --git a/playbooks/roles/debian/email/handlers/main.yml b/playbooks/roles/debian/email/handlers/main.yml new file mode 100644 index 0000000..3bb8061 --- /dev/null +++ b/playbooks/roles/debian/email/handlers/main.yml @@ -0,0 +1,5 @@ +- name: Restart spamassassin + become: true + service: + name: spamassassin + state: reloaded diff --git a/playbooks/roles/debian/email/tasks/main.yml b/playbooks/roles/debian/email/tasks/main.yml index ccf18cc..987a988 100644 --- a/playbooks/roles/debian/email/tasks/main.yml +++ b/playbooks/roles/debian/email/tasks/main.yml @@ -14,10 +14,3 @@ 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 -- 2.39.5