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