mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 13:50:22 -07: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:
parent
c0f8af5202
commit
86d47bce5f
11 changed files with 51 additions and 33 deletions
|
@ -23,8 +23,9 @@ class LookupModule(object):
|
|||
self.basedir = basedir
|
||||
|
||||
def run(self, terms, inject=None, **kwargs):
|
||||
if isinstance(terms, basestring):
|
||||
terms = [ terms ]
|
||||
|
||||
terms = utils.listify_lookup_plugin_terms(terms, self.basedir, inject)
|
||||
|
||||
ret = []
|
||||
for term in terms:
|
||||
ret.append(template.template_from_file(self.basedir, term, inject))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue