mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Make more lookup plugins tolerant of new variable system, with a little better 'do what I mean' logic to resolving
what happens if you get a string back as a template result.
This commit is contained in:
@@ -725,7 +725,11 @@ def listify_lookup_plugin_terms(terms, basedir, inject):
|
||||
|
||||
if not '{' in terms and not '[' in terms and not terms.strip().startswith("/"):
|
||||
try:
|
||||
terms = template.template(basedir, "{{ %s }}" % terms, inject)
|
||||
new_terms = template.template(basedir, "{{ %s }}" % terms, inject)
|
||||
if isinstance(new_terms, basestring) and new_terms.find("{{") != -1:
|
||||
pass
|
||||
else:
|
||||
terms = new_terms
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user