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

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

Just add something like this:

  • name: Mail Results
    mail:

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