From 8070c0cf9aa181f98d52407f053b941f08c16613 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 1 Aug 2019 13:32:01 +0200 Subject: postfix-satellite: o Removing keys default_transport and relay_transport. o Moving postfix-satellite to its own file. --- .../roles/postfix-satellite/tasks/postfix-satellite.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'ansible/roles') diff --git a/ansible/roles/postfix-satellite/tasks/postfix-satellite.yml b/ansible/roles/postfix-satellite/tasks/postfix-satellite.yml index 8a11a84..2303523 100644 --- a/ansible/roles/postfix-satellite/tasks/postfix-satellite.yml +++ b/ansible/roles/postfix-satellite/tasks/postfix-satellite.yml @@ -2,6 +2,7 @@ package: name: "{{ items }}" state: present + tags: packages vars: items: - postfix @@ -13,15 +14,20 @@ notify: reload postfix lineinfile: dest: /etc/postfix/main.cf - line: "{{ item.key }} = {{ item.value }}" + line: "{{ (item.key + ' = ' + item.value) if state=='present' else None }}" regexp: "^{{ item.key }} =" + state: "{{ state }}" + vars: + state: "{{ item.state|default('present') }}" with_items: - key: "mydomain" value: "{{ postfix_satellite__mydomain }}" - key: "myorigin" value: "{{ postfix_satellite__myorigin }}" - key: "mydestination" - value: "" + state: absent + - key: "myhostname" + state: absent - key: "mynetworks" value: "{{ postfix_satellite__mynetworks }}" - key: "smtp_sasl_auth_enable" @@ -38,6 +44,10 @@ value: "4096000" - key: "relayhost" value: "{{ postfix__relayhost }}" + - key: "default_transport" + state: absent + - key: "relay_transport" + state: absent - name: Create /etc/postfix/sasl_passwd tags: postfix-satellite-config -- cgit v1.2.3