Michael Grote
7dfe80a4dc
Reviewed-on: #588 Co-authored-by: Michael Grote <michael.grote@posteo.de> Co-committed-by: Michael Grote <michael.grote@posteo.de>
40 lines
813 B
YAML
40 lines
813 B
YAML
---
|
|
- name: Ensure needed packages are installed
|
|
become: true
|
|
ansible.builtin.package:
|
|
name:
|
|
- postfix
|
|
- mailutils
|
|
# - libsasl2-modules
|
|
state: present
|
|
|
|
- name: kopiere sasl_passwd # entfernen
|
|
become: true
|
|
ansible.builtin.file:
|
|
path: /etc/postfix/sasl_passwd
|
|
state: absent
|
|
|
|
- name: kopiere sender_canonical # entfernen
|
|
become: true
|
|
ansible.builtin.file:
|
|
path: /etc/postfix/sasl_passwd
|
|
state: absent
|
|
|
|
- name: Template postfix configuration
|
|
become: true
|
|
ansible.builtin.template:
|
|
src: main.cf
|
|
dest: /etc/postfix/main.cf
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
notify:
|
|
- reload postfix
|
|
- send testmail
|
|
|
|
- name: Ensure default cron mailing is disabled
|
|
become: true
|
|
ansible.builtin.cron:
|
|
name: MAILTO
|
|
env: true
|
|
job: ""
|