ansible-ffibk/roles/service-nullmailer/tasks/main.yml
2018-09-18 14:27:58 +02:00

32 lines
636 B
YAML

---
- name: install postfix packages
package:
name: "{{ nullmailer_packages }}"
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