# Send an email on Yum update (success) or fail, etc

**URL:** <https://forum.ansible.com/t/send-an-email-on-yum-update-success-or-fail-etc/33190>\
**Category:** AWX Project\
**Tags:** ubuntu, awx\
**Created:** [June 15, 2020, 11:12pm UTC](https://forum.ansible.com/t/send-an-email-on-yum-update-success-or-fail-etc/33190 "2020-06-15T23:12:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_Biker](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bill_biker/32/8087_2.png) [@Bill\_Biker](https://forum.ansible.com/u/Bill_Biker)\
**Post date:** [June 15, 2020, 11:12pm UTC](https://forum.ansible.com/t/send-an-email-on-yum-update-success-or-fail-etc/33190/1 "2020-06-15T23:12:31Z")

</div>

Hello All,

Finally got my axw running reliably. Using Ubuntu 19.10.  
I use the yum module (ansible) with success for listing, updating, etc.

I hope this question is not out-of-scope for the awx forum.

I can get the status of the yum module (like changed, failed, etc  
I register the yum results in a variable, and can get results like yum\_status.changed.

I want to send an email base on the status: when changed is “false”

Any tips on how to do this?

Thanks,

ewholz

---

<div class="post-metadata">

**Author:** ![wmedley](https://avatars.discourse-cdn.com/v4/letter/w/258eb7/32.png) [@wmedley](https://forum.ansible.com/u/wmedley)\
**Post date:** [June 16, 2020, 12:11am UTC](https://forum.ansible.com/t/send-an-email-on-yum-update-success-or-fail-etc/33190/2 "2020-06-16T00:11:26Z")

</div>

Just add something like this:

- name: Mail Results  
mail:

---

<div class="post-metadata">

**Author:** ![Bill\_Biker](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bill_biker/32/8087_2.png) [@Bill\_Biker](https://forum.ansible.com/u/Bill_Biker)\
**Post date:** [June 16, 2020, 1:45am UTC](https://forum.ansible.com/t/send-an-email-on-yum-update-success-or-fail-etc/33190/3 "2020-06-16T01:45:39Z")

</div>

Hello - thanks for the reply - I did find the correct syntax for this  
similar to your suggestion ; the when: variable needs to be configured with == and quotes.

thanks again
