ansible-msmtp-mailer/handlers/main.yml

16 lines
449 B
YAML
Raw Normal View History

2014-03-21 19:16:55 +00:00
---
2019-08-06 09:37:24 +00:00
# sending test mail using 'mail' command to root and test recipient
2014-03-21 19:16:55 +00:00
- name: test mail
2019-08-06 09:37:24 +00:00
shell: echo "Test mail from new/updated mSTMP\n\n $(uname -a)" | mail -s "Test mSMTP at $(hostname -f)" root "{{ msmtp_test_mail_recipient }}"
tags: mail
2018-05-07 08:30:52 +00:00
when: msmtp_send_test_mail
async: 30
poll: 5
2021-05-15 15:20:39 +00:00
- name: restart msmtpd
ansible.builtin.systemd:
state: restarted
daemon_reload: yes
name: msmtpd
when: ansible_os_family == "RedHat"