From 5fd878b1f5bb1c2cafef5c77853964294abef39d Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Thu, 12 Dec 2024 16:44:49 +0100 Subject: [PATCH] add handler for postmap conf files --- handlers/main.yml | 6 ++++++ tasks/configure.yml | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index b76ef3e..616a24b 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -7,3 +7,9 @@ - name: restart postfix service: name=postfix state=restarted + +- name: postmap sender relay + command: /usr/sbin/postmap /etc/postfix/sender_relay + +- name: postmap sasl passwd + command: /usr/sbin/postmap /etc/postfix/sasl_passwd diff --git a/tasks/configure.yml b/tasks/configure.yml index eb81608..6b31bc8 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -32,7 +32,9 @@ owner: root group: root mode: 0644 - notify: restart postfix + notify: + - postmap sender relay + - restart postfix when: postfix_sender_relay is defined - name: postfix | sasl passwd @@ -42,6 +44,8 @@ owner: root group: root mode: 0644 - notify: restart postfix + notify: + - postmap sasl passwd + - restart postfix when: postfix_sasl_passwd is defined