aboutsummaryrefslogtreecommitdiff
path: root/roles/dovecot/tasks
diff options
context:
space:
mode:
authorSam Chudnick <sam@chudnick.com>2023-07-02 19:04:30 -0400
committerSam Chudnick <sam@chudnick.com>2023-07-02 19:04:30 -0400
commit724d877995dfcc10c462a18dcb4ea6c8b60c2d03 (patch)
tree270537b8fca585717c1ffa7708e492593f7b2ed5 /roles/dovecot/tasks
initial commit
Diffstat (limited to 'roles/dovecot/tasks')
-rw-r--r--roles/dovecot/tasks/main.yml67
1 files changed, 67 insertions, 0 deletions
diff --git a/roles/dovecot/tasks/main.yml b/roles/dovecot/tasks/main.yml
new file mode 100644
index 0000000..ce5eb2c
--- /dev/null
+++ b/roles/dovecot/tasks/main.yml
@@ -0,0 +1,67 @@
1- name: install packages
2 package:
3 name:
4 - dovecot-imapd
5 - dovecot-sieve
6 state: latest
7
8- name: deploy dovecot.conf
9 copy:
10 src: dovecot.conf
11 dest: /etc/dovecot/dovecot.conf
12 owner: root
13 group: root
14 mode: '0644'
15
16- name: deploy dovecot configuration files
17 copy:
18 src: "{{ item }}"
19 dest: /etc/dovecot/conf.d/
20 owner: root
21 group: root
22 mode: '0644'
23 with_fileglob: "files/conf.d/*"
24
25- name: deploy dovecot tls configuration file
26 template:
27 src: templates/10-ssl.conf.j2
28 dest: /etc/dovecot/conf.d/10-ssl.conf
29 owner: root
30 group: root
31 mode: '0644'
32
33- name: create sieve dir
34 file:
35 path: /var/lib/dovecot/sieve
36 state: directory
37
38- name: deploy default sieve script
39 copy:
40 src: default.sieve
41 dest: /var/lib/dovecot/sieve/default.sieve
42 owner: root
43 group: root
44 mode: '0644'
45
46- name: compile default sieve script
47 command:
48 cmd: sievec /var/lib/dovecot/sieve/default.sieve
49
50- name: deploy dovecot PAM configuration
51 copy:
52 src: dovecot_pam
53 dest: /etc/pam.d/dovecot
54 owner: root
55 group: root
56 mode: '0644'
57
58- name: enable dovecot
59 systemd:
60 enabled: yes
61 masked: no
62 name: dovecot
63
64- name: restart dovecot
65 service:
66 name: dovecot
67 state: restarted