# Email results , either failure or success

**URL:** <https://forum.ansible.com/t/email-results-either-failure-or-success/36203>\
**Category:** Ansible Project\
**Created:** [January 14, 2022, 4:08pm UTC](https://forum.ansible.com/t/email-results-either-failure-or-success/36203 "2022-01-14T16:08:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nitrous](https://avatars.discourse-cdn.com/v4/letter/n/dfb087/32.png) [@Nitrous](https://forum.ansible.com/u/Nitrous)\
**Post date:** [January 14, 2022, 4:08pm UTC](https://forum.ansible.com/t/email-results-either-failure-or-success/36203/1 "2022-01-14T16:08:27Z")

</div>

We have 3 playbooks, that all acheive different tasks when building a server.  
Each playbook can have either a role in it or a module from collection.

How can I email result of when either a task fails in any of 3 playbooks ( this is when ansible quits, and I rerun my playbook again) and, email me final result of when the whole build was successful only.

Hope I am making sense.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [January 14, 2022, 4:16pm UTC](https://forum.ansible.com/t/email-results-either-failure-or-success/36203/2 "2022-01-14T16:16:08Z")

</div>

for failures [https://docs.ansible.com/ansible/latest/collections/community/general/mail\_callback.html](https://docs.ansible.com/ansible/latest/collections/community/general/mail_callback.html)

for success [https://docs.ansible.com/ansible/latest/collections/community/general/mail\_module.html](https://docs.ansible.com/ansible/latest/collections/community/general/mail_module.html)
