1
0
Fork 0
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:
Christoph Fiehe 2026-03-02 22:18:49 +01:00 committed by GitHub
parent f7ecdf7a2e
commit 0e5bb9b87a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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