mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-04 12:22:45 +00:00
Fixes #4608 add lookup to template globals to make plugins work again
This commit is contained in:
@@ -504,6 +504,8 @@ def template_from_string(basedir, data, vars, fail_on_undefined=False):
|
|||||||
else:
|
else:
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
t.globals['lookup'] = my_lookup
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return t.render(vars)
|
return t.render(vars)
|
||||||
except jinja2.exceptions.UndefinedError:
|
except jinja2.exceptions.UndefinedError:
|
||||||
|
|||||||
Reference in New Issue
Block a user