mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-04 07:51:50 +00:00
merge_variables lookup: avoid deprecated Templar.set_temporary_context (#10566)
Avoid deprecated Templar.set_temporary_context.
This commit is contained in:
parent
bd84f65456
commit
14f706c5dd
2 changed files with 4 additions and 2 deletions
|
|
@ -193,8 +193,8 @@ class LookupModule(LookupBase):
|
|||
result = initial_value
|
||||
|
||||
for var_name in var_merge_names:
|
||||
with self._templar.set_temporary_context(available_variables=variables): # tmp. switch renderer to context of current variables
|
||||
var_value = self._templar.template(variables[var_name]) # Render jinja2 templates
|
||||
temp_templar = self._templar.copy_with_new_env(available_variables=variables) # tmp. switch renderer to context of current variables
|
||||
var_value = temp_templar.template(variables[var_name]) # Render jinja2 templates
|
||||
var_type = _verify_and_get_type(var_value)
|
||||
|
||||
if prev_var_type is None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue