mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
Moving over all lookup plugins to v2
This commit is contained in:
parent
45f8e6f3b0
commit
1544dde932
54 changed files with 1650 additions and 37 deletions
|
@ -30,7 +30,7 @@ __all__ = ['listify_lookup_plugin_terms']
|
|||
|
||||
LOOKUP_REGEX = re.compile(r'lookup\s*\(')
|
||||
|
||||
def listify_lookup_plugin_terms(terms, variables):
|
||||
def listify_lookup_plugin_terms(terms, variables, loader):
|
||||
|
||||
if isinstance(terms, basestring):
|
||||
# someone did:
|
||||
|
@ -46,7 +46,7 @@ def listify_lookup_plugin_terms(terms, variables):
|
|||
# if not already a list, get ready to evaluate with Jinja2
|
||||
# not sure why the "/" is in above code :)
|
||||
try:
|
||||
templar = Templar(variables=variables)
|
||||
templar = Templar(loader=loader, variables=variables)
|
||||
new_terms = templar.template("{{ %s }}" % terms)
|
||||
if isinstance(new_terms, basestring) and "{{" in new_terms:
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue