From 4895573883df830a82b65b8ecf96abde18370147 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 1 Dec 2013 17:08:53 +0100 Subject: 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.) --- roles/common/tasks/mail.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'roles/common/tasks/mail.yml') 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 -- cgit v1.2.3