From 538a5a0142ebfc4e03bcee061ec8d31856f907c0 Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Tue, 22 Jan 2019 09:06:04 +1300 Subject: [PATCH] Updated regex for postfix configurations --- tasks/communication.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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