summaryrefslogtreecommitdiffstats
path: root/roles/common/tasks
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2013-12-01 17:08:53 +0100
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:51:00 +0200
commit4895573883df830a82b65b8ecf96abde18370147 (patch)
tree171d5847392e60dc11b130d54626215def2de1ff /roles/common/tasks
parent1387b69c898cb93fd0343603f92670b40b88eb04 (diff)
Share master.cf accross all Postfix instances.
And use main.cf's 'master_service_disable' setting to deactivate each service that's useless for a given instance. (Hence solve conflict when trying to listen twice on the same port, for instance.)
Diffstat (limited to 'roles/common/tasks')
-rw-r--r--roles/common/tasks/mail.yml15
1 files changed, 9 insertions, 6 deletions
diff --git a/roles/common/tasks/mail.yml b/roles/common/tasks/mail.yml
index 9de0eaa..c562c42 100644
--- a/roles/common/tasks/mail.yml
+++ b/roles/common/tasks/mail.yml
@@ -15,13 +15,16 @@
notify:
- Restart Postfix
-- name: Define dynamic maps for children instances
- # main.cf and master.cf are configured in dedicated roles, though
- file: src=../postfix/dynamicmaps.cf
- dest=/etc/postfix-{{ postfix_instance[item].name }}/dynamicmaps.cf
- owner=root group=root state=link
+- name: Link the dynamic maps & master.cf of each children to the master's
+ # main.cf is specialized to each dedicated role, though
+ file: src=../postfix/{{ item.1 }}
+ dest=/etc/postfix-{{ postfix_instance[item.0].name }}/{{ item.1 }}
+ owner=root group=root
+ state=link force=yes
register: r2
- with_items: postfix_instance.keys() | intersect(group_names) | list
+ with_nested:
+ - postfix_instance.keys() | intersect(group_names) | list
+ - [ 'dynamicmaps.cf', 'master.cf' ]
notify:
- Restart Postfix