2018-01-07 17:39:51 +01:00
|
|
|
---
|
|
|
|
- name: install postfix packages
|
|
|
|
package:
|
2018-09-16 12:38:33 +02:00
|
|
|
name: "{{ nullmailer_packages }}"
|
2018-01-07 17:39:51 +01:00
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: write /etc/mailname
|
|
|
|
template:
|
|
|
|
src: mailname.j2
|
|
|
|
dest: /etc/mailname
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
notify: reload systemd unit postfix
|
|
|
|
|
|
|
|
- name: configure mail aliases
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/aliases
|
|
|
|
state: present
|
|
|
|
regexp: '^root:'
|
|
|
|
line: "root: {{ admin_mail_address }}"
|
|
|
|
notify: run postalias
|
|
|
|
|
|
|
|
- name: write /etc/postfix/main.cf
|
|
|
|
template:
|
|
|
|
src: main.cf.j2
|
|
|
|
dest: /etc/postfix/main.cf
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
notify: reload systemd unit postfix
|