You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/lib/ansible/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
4 years ago
..
__init__.py Consolidate filters/tests handling into JinjaPluginIntercept (#71463) 4 years ago
native_helpers.py Force template module to use non-native Jinja2 (#68560) 4 years ago
safe_eval.py Do not pretend expression is filename in compile() Python built-in call (#73113) 4 years ago
template.py Prevent templating unused variables for {%include%} (#68749) 5 years ago
vars.py Local vars should have highest precedence in AnsibleJ2Vars (#72830) 4 years ago