Understood. This was the direction I was following to try to solve my issue actually, I am not tied to this functionality/option.
If I rephrase my original issue:
1. Our playbooks reference host variables, e.g via {{ hostvars[host].hostname }} in a template file (we use this to configure an Opnsense instance).
2. This variable is set within our inventory file as: hostname: "{{customer_name}}-runtime-{{ type_of_stack }} }}"
3. {{ customer_name}} and {{type_of_stack}} are defined in an extra variable file passed to ansible-playbook via --extra-vars
4. The Ansible variable evaluation system/lazy evaluation system correctly expands the variable during the playbook run via ansible-playbook
When run in AWX, inventory parsing occurs as a separate phase and I see the variable does not have the correct value. It remains "{{customer_name}}-runtime-{{ type_of_stack }} }}", w/o expansion.
Matt Martz/sivel on IRC today told me the following w.r.t ansible-inventory:
<sivel> > what do you mean just ansible-inventory alone? ansible-inventory does nothing with extra vars
<sivel> > inventory plugins can use extra vars, so afaik that is why the option exists for ansible-inventory, but by default it doesn't influence anything
<sivel> > yeah, that is correct, --extra-vars only exists for ansible-inventory, so that inventory plugins _can_ read it, but it doesn't affect any vars actually listed in inventory
<sivel> > lazy evaluations of variables in a play would expand it, unless AWX is marking things as unsafe, which would prevent templating
So am kind of running in a loop here as to make this work in AWX. The closest I am w/ now is to write a custom inventory plugin which would perform the expansion to make it behave like ansible-playbook does )but I don't even know how to trigger variable expansion via Python code like ansible-playbook does).
Isn't there another, simpler way to achieve what I want here?