diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2014-06-25 02:37:48 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-06-07 02:51:48 +0200 |
commit | 2a2333cdfb016bb884887f46fbcbfdce6e064d74 (patch) | |
tree | e85d7c802436e3c5615ee8eef2ca9c68cd5eb895 /roles/IMAP-proxy | |
parent | e9e8ce2add2b7c020daa02228e506e7c02828c15 (diff) |
Assume a DNS entry for each role.
E.g., ldap.fripost.org, ntp.fripost.org, etc. (Ideally the DNS zone
would be provisioned by ansible, too.) It's a bit unclear how to index
the subdomains (mx{1,2,3}, etc), though.
Diffstat (limited to 'roles/IMAP-proxy')
-rw-r--r-- | roles/IMAP-proxy/files/etc/dovecot/conf.d/20-imapc.conf (renamed from roles/IMAP-proxy/templates/etc/dovecot/conf.d/20-imapc.conf.j2) | 2 | ||||
-rw-r--r-- | roles/IMAP-proxy/files/etc/dovecot/conf.d/auth-imap.conf.ext (renamed from roles/IMAP-proxy/templates/etc/dovecot/conf.d/auth-imap.conf.ext.j2) | 2 | ||||
-rw-r--r-- | roles/IMAP-proxy/tasks/main.yml | 16 |
3 files changed, 5 insertions, 15 deletions
diff --git a/roles/IMAP-proxy/templates/etc/dovecot/conf.d/20-imapc.conf.j2 b/roles/IMAP-proxy/files/etc/dovecot/conf.d/20-imapc.conf index a6b70c6..47785a4 100644 --- a/roles/IMAP-proxy/templates/etc/dovecot/conf.d/20-imapc.conf.j2 +++ b/roles/IMAP-proxy/files/etc/dovecot/conf.d/20-imapc.conf @@ -4,7 +4,7 @@ # http://wiki2.dovecot.org/HowTo/ImapcProxy # http://wiki2.dovecot.org/Migration/Dsync -imapc_host = {{ IMAP }} +imapc_host = imap.fripost.org imapc_port = 143 imapc_user = %u diff --git a/roles/IMAP-proxy/templates/etc/dovecot/conf.d/auth-imap.conf.ext.j2 b/roles/IMAP-proxy/files/etc/dovecot/conf.d/auth-imap.conf.ext index 5e2b28c..7478889 100644 --- a/roles/IMAP-proxy/templates/etc/dovecot/conf.d/auth-imap.conf.ext.j2 +++ b/roles/IMAP-proxy/files/etc/dovecot/conf.d/auth-imap.conf.ext @@ -4,7 +4,7 @@ passdb { driver = imap - args = host={{ IMAP }} port=143 + args = host=imap.fripost.org port=143 default_fields = userdb_imapc_user=%u userdb_imapc_password=%w } diff --git a/roles/IMAP-proxy/tasks/main.yml b/roles/IMAP-proxy/tasks/main.yml index c630cfd..f76ee72 100644 --- a/roles/IMAP-proxy/tasks/main.yml +++ b/roles/IMAP-proxy/tasks/main.yml @@ -17,28 +17,18 @@ owner=imapproxy group=imapproxy mode=0700 -- name: Configure Dovecot (1) +- name: Configure Dovecot copy: src=etc/dovecot/conf.d/{{ item }} dest=/etc/dovecot/conf.d/{{ item }} owner=root group=root mode=0644 - register: r1 + register: r 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: @@ -46,6 +36,6 @@ - name: Start Dovecot service: name=dovecot state=started - when: not (r1.changed or r2.changed) + when: not r.changed - meta: flush_handlers |