diff --git a/handlers/main.yml b/handlers/main.yml index 871ed00..a9a70bb 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -3,6 +3,6 @@ service: name: postfix state: restarted - listen: - - "postfix_restart" + listen: __postfix_restart become: True + become_user: root diff --git a/tasks/config.yml b/tasks/config.yml index 1d22b3f..027f935 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -8,7 +8,7 @@ owner: root group: root mode: 0644 - notify: postfix_restart + notify: __postfix_restart - name: Create sasl template: @@ -28,7 +28,7 @@ command: /usr/sbin/postmap hash:/etc/postfix/sasl_passwd when: not sasldb.stat.exists or sasl_result.changed register: sasldb_update - notify: postfix_restart + notify: __postfix_restart - name: Set permissions for sasl_passwd.db file: @@ -36,7 +36,7 @@ owner: root group: root mode: 0600 - notify: postfix_restart + notify: __postfix_restart - name: Override outgoing header template: @@ -56,6 +56,6 @@ command: "/usr/sbin/postmap hash:/etc/postfix/sender_canonical" when: not senderdb.stat.exists or sender_result.changed register: senderdb_update - notify: postfix_restart + notify: __postfix_restart become: True become_user: root diff --git a/tasks/install.yml b/tasks/install.yml index 3f1f06c..e07c483 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -10,3 +10,4 @@ - cyrus-sasl-plain - mailx become: True + become_user: root