aboutsummaryrefslogtreecommitdiff
path: root/roles/opendmarc/tasks/main.yml
blob: 6c2fb8b9693a2297b4df2d59acc9341cb21f8884 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
- name: install packages
  package:
    name:
      - opendmarc
      - dbconfig-no-thanks
    state: latest

- name: make directory for socket inside postfix chroot
  file:
    path: /var/spool/postfix/opendmarc
    owner: opendmarc
    group: opendmarc
    mode: '770'
    state: directory

- name: add postfix user to opendmarc group
  user:
    name: postfix
    groups: opendmarc
    append: yes

- name: deploy configuration
  copy:
    src: opendmarc.conf
    dest: /etc/opendmarc.conf
    owner: root
    group: root
    mode: '0644'

- name: enable opendmarc
  systemd:
    enabled: yes
    masked: no
    name: opendmarc

- name: restart opendmarc
  service:
    name: opendmarc
    state: restarted