homeserver/roles/mgrote_postfix/tasks/main.yml

41 lines
813 B
YAML
Raw Permalink Normal View History

---
- 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: ""