homeserver/roles/mgrote_postfix/handlers/main.yml
Michael Grote 7a24089031 fix linter errors (#584)
Reviewed-on: #584
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
2023-10-25 22:26:17 +02:00

22 lines
671 B
YAML

---
- name: hash_sasl_passwd # noqa no-changed-when
become: true
ansible.builtin.command: /usr/sbin/postmap hash:/etc/postfix/sasl_passwd
- name: hash_sender_canonical # noqa no-changed-when
become: true
ansible.builtin.command: /usr/sbin/postmap hash:/etc/postfix/sender_canonical
- name: postfix_reload
become: true
ansible.builtin.systemd:
name: postfix
enabled: true
state: restarted
notify: postfix_testmail
- name: postfix_testmail # noqa no-changed-when
ansible.builtin.shell:
cmd: "set -o pipefail && echo 'postfix ist eingerichtet' | mail -s '{{ ansible_hostname }} - postfix' {{ empfaenger_mail }}"
executable: /bin/bash