aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-08-01 13:32:01 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2019-08-08 09:03:13 +0200
commit8070c0cf9aa181f98d52407f053b941f08c16613 (patch)
treed89ef7c20977964fc6be01b2d29e033e1c5a4e6e /ansible/roles
parentfe4b8b3a499270df23b1ac3f0d8ec17e22f055ae (diff)
downloadinfra-8070c0cf9aa181f98d52407f053b941f08c16613.tar.gz
infra-8070c0cf9aa181f98d52407f053b941f08c16613.tar.bz2
infra-8070c0cf9aa181f98d52407f053b941f08c16613.tar.xz
infra-8070c0cf9aa181f98d52407f053b941f08c16613.zip
postfix-satellite:
o Removing keys default_transport and relay_transport. o Moving postfix-satellite to its own file.
Diffstat (limited to 'ansible/roles')
-rw-r--r--ansible/roles/postfix-satellite/tasks/postfix-satellite.yml14
1 files changed, 12 insertions, 2 deletions
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