I have a role that when it runs is only partially resolving variables.
Variable_A: defined in defaults - string
Variable_B: defined in defaults - hostvars reference to Variable_C that will be loaded through include_vars
Variable_C: defined in file and loaded through include_vars - string to reference Variable_A
The role task is to use Variable_B. When the role runs the task ends up being set to “{{ Variable _A }}” instead of the string like Ansible stopped resolving variables.
If I switch the role to use a Variable_A loaded through include_vars instead Ansible resolves the variable completely.
I have a role that when it runs is only partially resolving variables.
Variable_A: defined in defaults - string
Variable_B: defined in defaults - hostvars reference to Variable_C that
will be loaded through include_vars
Variable_C: defined in file and loaded through include_vars - string to
reference Variable_A
The role task is to use Variable_B. When the role runs the task ends up
being set to "{{ Variable _A }}" instead of the string like Ansible stopped
resolving variables.
If I switch the role to use a Variable_A loaded through include_vars
instead Ansible resolves the variable completely.
Is this expected or is it a bug?
You should post at least the declaration of the variables. "Variable_A" and
"Variable_C" is clear. But what do you mean with "defined in defaults -
hostvar reference" ?
"Variable_B: defined in defaults - hostvars reference to Variable_C"
It would be just guessing without complete, minimal, reproducible example.