Enable LDAP

This commit is contained in:
Morre 2020-07-12 17:13:36 +02:00
parent b6df106387
commit a38390c678
No known key found for this signature in database
GPG key ID: 5D9B9B1B8F424BBC
9 changed files with 127 additions and 45 deletions

View file

@ -5,14 +5,30 @@
- dovecot-imapd
- dovecot-managesieved
- name: install dovecot-ldap
apt:
pkg:
- dovecot-ldap
when: dovecot.ldap.enable
- name: add vmail group
group:
name: vmail
register: vmail_group
- name: add vmail user
user:
name: vmail
group: vmail
register: vmail_user
- name: Create /var/vmail
file:
path: /var/vmail
state: directory
owner: vmail
group: vmail
mode: '0750'
- name: copy dovecot config
template:
@ -27,6 +43,8 @@
- { src: "15-lda.conf.j2", dest: "/etc/dovecot/conf.d/15-lda.conf" }
- { src: "20-managesieve.conf.j2", dest: "/etc/dovecot/conf.d/20-managesieve.conf" }
- { src: "auth-system.conf.j2", dest: "/etc/dovecot/conf.d/auth-system.conf" }
- { src: "auth-ldap.conf.j2", dest: "/etc/dovecot/conf.d/auth-ldap.conf" }
- { src: "dovecot-ldap.conf.ext.j2", dest: "/etc/dovecot/dovecot-ldap.conf.ext" }
notify:
- restart dovecot