[WARNING]: * Failed to parse /runner/inventory/constructed.yml with auto
plugin: failed to parse /runner/inventory/constructed.yml: Could not set
play_customer for host HOST123: ‘play_customer’ is undefined. ‘play_customer’ is undefined
. Could not set play_customer for host HOST234: ‘play_customer’ is undefined.
‘play_customer’ is undefined
On Ansible CLI (outside AWX) - it works perfectly.
play_customer variable being interpolated in constructed inventory
Actual results
[WARNING]: * Failed to parse /runner/inventory/constructed.yml with auto
plugin: failed to parse /runner/inventory/constructed.yml: Could not set
play_customer for host HOST123: ‘play_customer’ is undefined. ‘play_customer’ is undefined
. Could not set play_customer for host HOST234: ‘play_customer’ is undefined.
‘play_customer’ is undefined
Additional information
I’ve done lot of testing and confirmed that the ‘Control Plane’ execution environment that runs the inventory source job for the constructed inventory, does not have the extra vars
All the other jobs in the workflow - do have the extra vars
Please also see:
Anyone got any ideas ??
The invocation of the constructed inventory sync job is not being passed the extra vars
So this means that your source vars would have to be the “environment variable” variant of it, which “compose” doesn’t have, but e.g. use_extra_vars: true would become ANSIBLE_INVENTORY_USE_EXTRA_VARS: true most likely…