ansible/test/integration/targets/template
Martin Krizek a2af8432f3
Local vars should have highest precedence in AnsibleJ2Vars (#72830)
Ability to add local variables into AnsibleJ2Vars was added in
18a9eff11f to fix #6653. Local variables
are added using ``AnsibleJ2Vars.add_locals()`` method when creating a
new context - typically when including/importing a template with
context. For that use case local template variables created using
``set`` should override variables from higher contexts - either from the
play or any parent template, or both; Jinja behaves the same way.

Also removes AnsibleJ2Vars.extras instance variable which is not used.

Also adds missing test for #6653.

Fixes #72262
Fixes #72615

ci_complete
2021-01-26 11:37:56 +01:00
..
custom_tasks
files
meta
role_filter
tasks Emit proper error for x in y when y is undefined (#70990) 2020-07-30 15:57:01 -04:00
templates Local vars should have highest precedence in AnsibleJ2Vars (#72830) 2021-01-26 11:37:56 +01:00
vars
6653.yml Local vars should have highest precedence in AnsibleJ2Vars (#72830) 2021-01-26 11:37:56 +01:00
72262.yml Local vars should have highest precedence in AnsibleJ2Vars (#72830) 2021-01-26 11:37:56 +01:00
72615.yml Local vars should have highest precedence in AnsibleJ2Vars (#72830) 2021-01-26 11:37:56 +01:00
aliases
ansible_managed.cfg
ansible_managed.yml
corner_cases.yml
custom_template.yml
filter_plugins.yml
runme.sh Local vars should have highest precedence in AnsibleJ2Vars (#72830) 2021-01-26 11:37:56 +01:00
template.yml
undefined_var_info.yml Provide more information in AnsibleUndefinedVariable (#71666) 2020-09-22 09:38:53 -04:00
unused_vars_include.yml