diff --git a/tasks/communication.yml b/tasks/communication.yml index e95757b..1b58f7c 100644 --- a/tasks/communication.yml +++ b/tasks/communication.yml @@ -11,20 +11,20 @@ when: "'SMTP0' not in inventory_hostname" with_items: - { dest: /etc/postfix/main.cf, - regexp: "inet_protocols =", + regexp: "^.?inet_protocols =", line: "inet_protocols = ipv4" } - { dest: /etc/postfix/main.cf, - regexp: "inet_interfaces =", + regexp: "^.?inet_interfaces =", line: "inet_interfaces = all" } - { dest: /etc/postfix/main.cf, - regexp: "relayhost =", + regexp: "^.?relayhost =", line: "relayhost = {{ relayhost }}" } - { dest: /etc/postfix/main.cf, - regexp: "smtp_randomize_addresses =", + regexp: "^.?smtp_randomize_addresses =", line: "smtp_randomize_addresses = no" } @@ -40,4 +40,4 @@ dest: ~/.forward regexp: "{{ root_email }}" line: "{{ root_email }}" - create: yes \ No newline at end of file + create: yes