From 14793f26f1f8bd6936fc3acfe3de83bc11ff0ed3 Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Fri, 19 Jan 2018 22:18:56 +1300 Subject: [PATCH] More Generic skipping of actual SMTP servers. Added additional option for randomization of addresses returned via DNS lookup. --- tasks/communication.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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: