summaryrefslogtreecommitdiffstats
path: root/roles/IMAP/tasks/imap.yml
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2014-07-04 17:48:52 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:52:27 +0200
commit252bc20ce5b161e20724e2f21ccb13bba3b7ed58 (patch)
tree033309ba942f2b61ca1f4199bda5d64beebd17b0 /roles/IMAP/tasks/imap.yml
parentc03c331b84b22f3322db1ad61b5dcd7fbaa020d3 (diff)
Tell Dovecot we have a remote IMAP proxy.
Diffstat (limited to 'roles/IMAP/tasks/imap.yml')
-rw-r--r--roles/IMAP/tasks/imap.yml16
1 files changed, 15 insertions, 1 deletions
diff --git a/roles/IMAP/tasks/imap.yml b/roles/IMAP/tasks/imap.yml
index aadcb6e..71a0cb4 100644
--- a/roles/IMAP/tasks/imap.yml
+++ b/roles/IMAP/tasks/imap.yml
@@ -99,25 +99,39 @@
owner=root group=root
mode=0644
register: r2
with_items:
- conf.d/10-auth.conf
- conf.d/10-logging.conf
- conf.d/10-mail.conf
- conf.d/10-master.conf
- conf.d/10-ssl.conf
- conf.d/15-mailboxes.conf
- conf.d/20-imap.conf
- conf.d/20-lmtp.conf
- conf.d/90-plugin.conf
- conf.d/90-sieve.conf
- conf.d/auth-ldap.conf.ext
- dovecot-ldap.conf.ext
- dovecot-ldap-userdb.conf.ext
notify:
- Restart Dovecot
+- name: Tell Dovecot we have a remote IMAP proxy
+ # XXX: we should have an automatic lookup here
+ lineinfile: dest=/etc/dovecot/dovecot.conf
+ regexp='^(\s*#)?\s*login_trusted_networks\s*='
+ line='login_trusted_networks = 171.25.193.76/32'
+ state=present
+ create=yes
+ owner=root group=root
+ mode=0644
+ register: r3
+ when: "'IMAP' in group_names and 'webmail' not in group_names"
+ notify:
+ - Restart Dovecot
+
- name: Start Dovecot
service: name=dovecot state=started
- when: not (r1.changed or r2.changed)
+ when: not (r1.changed or r2.changed or r3.changed)
- meta: flush_handlers