summaryrefslogtreecommitdiffstats
path: root/roles/IMAP-proxy/tasks
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2016-05-23 00:28:37 +0200
committerGuilhem Moulin <guilhem@fripost.org>2016-05-23 01:07:18 +0200
commit4b59f7a4cfe0f84e2084f01671982b7713a534aa (patch)
treec45803940d32ccd2c1003e311ba28467b9d34a4e /roles/IMAP-proxy/tasks
parent7525e4c5dedea932491c80c3a5b597435a1e351f (diff)
Dovecot imapc: don't hardcode the master IMAP server's IP.
Diffstat (limited to 'roles/IMAP-proxy/tasks')
-rw-r--r--roles/IMAP-proxy/tasks/main.yml14
1 files changed, 12 insertions, 2 deletions
diff --git a/roles/IMAP-proxy/tasks/main.yml b/roles/IMAP-proxy/tasks/main.yml
index 579fc7e..93a5181 100644
--- a/roles/IMAP-proxy/tasks/main.yml
+++ b/roles/IMAP-proxy/tasks/main.yml
@@ -24,13 +24,23 @@
dest=/etc/dovecot/conf.d/{{ item }}
owner=root group=root
mode=0644
- register: r
+ register: r1
with_items:
- 10-auth.conf
- 10-logging.conf
- 10-mail.conf
- 10-master.conf
- 15-mailboxes.conf
+ notify:
+ - Restart Dovecot
+
+- name: Configure Dovecot (2)
+ template: src=etc/dovecot/conf.d/{{ item }}.j2
+ dest=/etc/dovecot/conf.d/{{ item }}
+ owner=root group=root
+ mode=0644
+ register: r2
+ with_items:
- 20-imapc.conf
- auth-imap.conf.ext
notify:
@@ -38,7 +48,7 @@
- name: Start Dovecot
service: name=dovecot state=started
- when: not r.changed
+ when: not (r1.changed or r2.changed)
- meta: flush_handlers