ansible-ffibk/roles/service-nullmailer/tasks/main.yml

32 lines
636 B
YAML
Raw Normal View History

2018-01-07 17:39:51 +01:00
---
- name: install postfix packages
package:
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