homeserver/roles/mgrote_postfix/handlers/main.yml

14 lines
394 B
YAML
Raw Normal View History

---
- name: reload postfix
become: true
ansible.builtin.systemd:
name: postfix
enabled: true
state: restarted
notify: send testmail
- name: send testmail # noqa no-changed-when
ansible.builtin.shell:
cmd: "set -o pipefail && echo 'postfix ist eingerichtet' | mail -aFROM:postfix@mgrote.net -s '{{ ansible_hostname }} - postfix' {{ my_mail }}"
executable: /bin/bash