initial commit
This commit is contained in:
commit
9036a73324
8 changed files with 548 additions and 0 deletions
45
tasks/main.yml
Normal file
45
tasks/main.yml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
- name: install dovecot
|
||||
apt:
|
||||
pkg: "{{ item }}"
|
||||
with_items:
|
||||
- dovecot-common
|
||||
- dovecot-imapd
|
||||
- dovecot-managesieved
|
||||
|
||||
- name: add vmail group
|
||||
group:
|
||||
name: vmail
|
||||
|
||||
- name: add vmail user
|
||||
user:
|
||||
name: vmail
|
||||
group: vmail
|
||||
|
||||
- name: copy dovecot config
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
with_items:
|
||||
- { src: "dovecot.conf.j2", dest: "/etc/dovecot/dovecot.conf" }
|
||||
- { src: "10-auth.conf.j2", dest: "/etc/dovecot/conf.d/10-auth.conf" }
|
||||
- { src: "10-master.conf.j2", dest: "/etc/dovecot/conf.d/10-master.conf" }
|
||||
- { src: "10-ssl.conf.j2", dest: "/etc/dovecot/conf.d/10-ssl.conf" }
|
||||
- { src: "auth-system.conf.j2", dest: "/etc/dovecot/conf.d/auth-system.conf" }
|
||||
notify:
|
||||
- restart dovecot
|
||||
|
||||
- name: replace lines in config
|
||||
lineinfile:
|
||||
path: /etc/dovecot/conf.d/10-mail.conf
|
||||
line: "mail_location = maildir:~/Maildir"
|
||||
regexp: '^mail_location '
|
||||
notify:
|
||||
- restart dovecot
|
||||
|
||||
- name: setup dovecot users
|
||||
template:
|
||||
src: passwd.j2
|
||||
dest: /etc/dovecot/passwd
|
||||
owner: root
|
||||
group: dovecot
|
||||
mode: 0640
|
||||
Loading…
Add table
Add a link
Reference in a new issue