mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-22 05:09:12 +00:00
Update plugins/lookup/merge_variables.py
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
f7ecdf7a2e
commit
0e5bb9b87a
1 changed files with 3 additions and 4 deletions
|
|
@ -367,10 +367,9 @@ class LookupModule(LookupBase):
|
|||
|
||||
merger = builder.build()
|
||||
|
||||
if self._templar is not None:
|
||||
templar = self._templar.copy_with_new_env(available_variables=variables)
|
||||
else:
|
||||
templar = Templar(loader=self._loader, variables=variables)
|
||||
if self._templar is None:
|
||||
raise AssertionError("Templar is not available")
|
||||
templar = self._templar.copy_with_new_env(available_variables=variables)
|
||||
|
||||
for var_name in var_merge_names:
|
||||
var_value = templar.template(variables[var_name]) # Render jinja2 templates
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue