homeserver/roles/mgrote_postfix/handlers/main.yml
Michael Grote 7dfe80a4dc move to containerized mail relayhost (#588)
Reviewed-on: #588
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
2023-10-31 11:37:50 +01:00

13 lines
368 B
YAML

---
- 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 -s '{{ ansible_hostname }} - postfix' {{ my_mail }}"
executable: /bin/bash