|
|
@ -391,6 +391,8 @@ class Templar:
|
|
|
|
instance = self._lookup_loader.get(name.lower(), loader=self._loader, templar=self)
|
|
|
|
instance = self._lookup_loader.get(name.lower(), loader=self._loader, templar=self)
|
|
|
|
|
|
|
|
|
|
|
|
if instance is not None:
|
|
|
|
if instance is not None:
|
|
|
|
|
|
|
|
wantlist = kwargs.pop('wantlist', False)
|
|
|
|
|
|
|
|
|
|
|
|
from ansible.utils.listify import listify_lookup_plugin_terms
|
|
|
|
from ansible.utils.listify import listify_lookup_plugin_terms
|
|
|
|
loop_terms = listify_lookup_plugin_terms(terms=args, templar=self, loader=self._loader, fail_on_undefined=True, convert_bare=False)
|
|
|
|
loop_terms = listify_lookup_plugin_terms(terms=args, templar=self, loader=self._loader, fail_on_undefined=True, convert_bare=False)
|
|
|
|
# safely catch run failures per #5059
|
|
|
|
# safely catch run failures per #5059
|
|
|
@ -404,8 +406,11 @@ class Templar:
|
|
|
|
ran = None
|
|
|
|
ran = None
|
|
|
|
|
|
|
|
|
|
|
|
if ran:
|
|
|
|
if ran:
|
|
|
|
from ansible.vars.unsafe_proxy import UnsafeProxy
|
|
|
|
from ansible.vars.unsafe_proxy import UnsafeProxy, wrap_var
|
|
|
|
ran = UnsafeProxy(",".join(ran))
|
|
|
|
if wantlist:
|
|
|
|
|
|
|
|
ran = wrap_var(ran)
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
ran = UnsafeProxy(",".join(ran))
|
|
|
|
|
|
|
|
|
|
|
|
return ran
|
|
|
|
return ran
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|