Search code examples
ansibleansible-tower

How can we include the playbook related information in email notification from ansible tower, like some variables value from the playbook?


I am currently working on a project for which I need to send email to my team members after its completion on ansible tower, I want have a grid there inside the email which would contain playbook specific information, note that this information is not accessible using parameters provided here : https://docs.ansible.com/ansible-tower/latest/html/installandreference/notification_parameters_supported.html Also I need to attach the log of the playbook inside the email.


Solution

  • You can checkout the mail_callback plugin in ansible to send mail to your team members, in which you can customize whatever view you want by writing the view in the python method

    Log can be fetched from the ansible tower api