diff options
Diffstat (limited to 'roles/spamassassin/tasks')
-rw-r--r-- | roles/spamassassin/tasks/main.yml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/roles/spamassassin/tasks/main.yml b/roles/spamassassin/tasks/main.yml new file mode 100644 index 0000000..4c69be5 --- /dev/null +++ b/roles/spamassassin/tasks/main.yml | |||
@@ -0,0 +1,40 @@ | |||
1 | - name: install packages | ||
2 | package: | ||
3 | name: | ||
4 | - spamassassin | ||
5 | state: latest | ||
6 | |||
7 | - name: make directory in postfix chroot | ||
8 | file: | ||
9 | path: /var/spool/postfix/spamd | ||
10 | owner: root | ||
11 | group: root | ||
12 | mode: '0755' | ||
13 | state: directory | ||
14 | |||
15 | - name: deploy configuration | ||
16 | template: | ||
17 | src: local.cf.j2 | ||
18 | dest: /etc/spamassassin/local.cf | ||
19 | owner: root | ||
20 | group: root | ||
21 | mode: '0644' | ||
22 | |||
23 | - name: deploy defaults file | ||
24 | copy: | ||
25 | src: defaults | ||
26 | dest: /etc/default/spamd | ||
27 | owner: root | ||
28 | group: root | ||
29 | mode: '0644' | ||
30 | |||
31 | - name: enable spamassassin | ||
32 | systemd: | ||
33 | enabled: yes | ||
34 | masked: no | ||
35 | name: spamd | ||
36 | |||
37 | - name: restart spamassassin | ||
38 | service: | ||
39 | name: spamd | ||
40 | state: restarted | ||