More Generic skipping of actual SMTP servers.

Added additional option for randomization of addresses returned via DNS lookup.
This commit is contained in:
2018-01-19 22:18:56 +13:00
parent 0eb82e31eb
commit 14793f26f1

View File

@@ -6,6 +6,7 @@
line: "{{item.line}}" line: "{{item.line}}"
insertafter: EOF insertafter: EOF
notify: Restart Postfix notify: Restart Postfix
when: "'SMTP0' not in inventory_hostname"
with_items: with_items:
- { dest: /etc/postfix/main.cf, - { dest: /etc/postfix/main.cf,
regexp: "inet_protocols =", regexp: "inet_protocols =",
@@ -19,7 +20,11 @@
regexp: "relayhost =", regexp: "relayhost =",
line: "relayhost = {{ 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 - name: Ensure Postfix is Started/Enabled
service: service: