Ansible Tower - Is it possible to show survey variables in notification

1.3k views Asked by At

I am using Tower 3.7.2. I have a basic survey that asks for some details and then passes these as variables to the associated playbook (after Workflow Approval). However I would like the approver to be able to see the survey variables in the email notification. There is something mentioned in the documentation about{{ jobs_metadata }}and the option to render {{ extra_vars }}

If {{ job_metadata }} is rendered in a job, it will include the following additional fields: ... extra_vars ...

However I don't receive any variables in the notification email. I think that this is quite fundamental question as the approver should be able to see what is he actually approving (e.g. adding new user, or creating new VM). Anyone who have been struggling with this issue? Any resolution?

1

There are 1 answers

1
gary lopez On

There are no way to use other variables in custom notifications of Ansible Tower, in this link are all the variables that can be used in custom notifications:

https://docs.ansible.com/ansible-tower/latest/html/installandreference/notification_parameters_supported.html

The workaround to this is use mail module.

https://docs.ansible.com/ansible/latest/collections/community/general/mail_module.html