Ansible-Config/SNOW/readme.md should note that extra variable cannot be passed unless the template requires it.
majormer opened this issue · comments
THANK YOU for this EXCELLENT GUIDE!
At Step 15, you show what the JSON should look like for extra_vars. However, if someone is following along in the video or reading the documentation, they might find that their extra variables are not being passed along. (happened to me) In my case, I spent 3 hours trying to make sure my JSON was right.
In this case, the following document notes the requirements:
20.13. Extra variables
When you pass survey variables, they are passed as extra variables (extra_vars) within automation controller. However, passing extra variables to a job template (as you would do with a survey) can override other variables being passed from the inventory and project.
Note
extra_vars passed to the job launch API are only honored if one of the following is true:
They correspond to variables in an enabled survey.
ask_variables_on_launch is set to True.
Ideally this is called out in the documentation (probably too late to call out on the video)
This would help people that are new to working with the API trying to use the ServiceNow integration with the Ansible Spoke
Updated the readme to include a note about ensuring either Prompt on Launch is checked or that the correspond to variables in an enabled survey in order for controller to receive the extra variables