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
|
2021-07-12 19:51:38 +00:00
|
|
|
shell: >
|
2021-07-12 19:39:30 +00:00
|
|
|
echo "Test mail from new/updated mSTMP\n\n $(uname -a)" |
|
|
|
|
mail -s "Test mSMTP at $(hostname -f)"
|
|
|
|
root "{{ msmtp_test_mail_recipient }}"
|
2018-04-28 18:21:08 +00:00
|
|
|
tags: mail
|
2018-05-07 08:30:52 +00:00
|
|
|
when: msmtp_send_test_mail
|
2018-05-07 09:53:56 +00:00
|
|
|
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"
|