diff --git a/tasks/communication.yml b/tasks/communication.yml index 291ae85..e11c085 100644 --- a/tasks/communication.yml +++ b/tasks/communication.yml @@ -6,6 +6,7 @@ line: "{{item.line}}" insertafter: EOF notify: Restart Postfix + when: "'SMTP0' not in inventory_hostname" with_items: - { dest: /etc/postfix/main.cf, regexp: "inet_protocols =", @@ -19,7 +20,11 @@ regexp: "relayhost =", line: "relayhost = {{ relayhost }}" } - when: "'SMTP' not in inventory_hostname" + - { + dest: /etc/postfix/main.cf, + regexp: "smtp_randomize_addresses =", + line: "smtp_randomize_addresses = no" + } - name: Ensure Postfix is Started/Enabled service: