main.yml 918 Bytes
Newer Older
Florian Pritz's avatar
Florian Pritz committed
1
2
3
4
5
6
7
---

- name: install postfix
  pacman: name=postfix state=present

- name: install main.cf
  template: src=main.cf.j2 dest=/etc/postfix/main.cf owner=root group=root mode=644
Florian Pritz's avatar
Florian Pritz committed
8
  notify:
Florian Pritz's avatar
Florian Pritz committed
9
10
11
12
    - reload postfix

- name: install master.cf
  template: src=master.cf.j2 dest=/etc/postfix/master.cf owner=root group=root mode=644
Florian Pritz's avatar
Florian Pritz committed
13
  notify:
Florian Pritz's avatar
Florian Pritz committed
14
15
16
17
18
19
20
21
22
23
    - reload postfix

- name: install aliases
  template: src=aliases.j2 dest=/etc/postfix/aliases owner=root group=root mode=644

- name: update aliases db
  command: postalias /etc/postfix/aliases

- name: create dhparam 2048
  command: openssl dhparam -out /etc/postfix/dh2048.pem 2048 creates=/etc/postfix/dh2048.pem
Florian Pritz's avatar
Florian Pritz committed
24
  notify:
Florian Pritz's avatar
Florian Pritz committed
25
26
27
28
    - reload postfix

- name: create dhparam 512
  command: openssl dhparam -out /etc/postfix/dh_512.pem 512 creates=/etc/postfix/dh_512.pem
Florian Pritz's avatar
Florian Pritz committed
29
  notify:
Florian Pritz's avatar
Florian Pritz committed
30
31
32
    - reload postfix

- name: start and enable postfix
Florian Pritz's avatar
Florian Pritz committed
33
  service: name=postfix enabled=yes state=started