---
- name: hash_sasl_passwd
become: yes
command: /usr/sbin/postmap hash:/etc/postfix/sasl_passwd
- name: hash_sender_canonical
command: /usr/sbin/postmap hash:/etc/postfix/sender_canonical
- name: postfix_reload
systemd:
name: postfix
enabled: yes
state: restarted
notify: postfix_testmail
- name: postfix_testmail
shell: echo "postfix ist eingerichtet" | mail -s "{{ ansible_hostname }} - postfix" {{ empfaenger_mail }}