mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +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:
@@ -66,10 +66,6 @@
|
||||
|
||||
# this will include the tasks in the file generic where it is found first (staging or production)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
from ansible import utils, errors
|
||||
import os
|
||||
|
||||
@@ -78,8 +74,12 @@ class LookupModule(object):
|
||||
def __init__(self, basedir=None, **kwargs):
|
||||
self.basedir = basedir
|
||||
|
||||
def run(self, terms, **kwargs):
|
||||
def run(self, terms, inject=None, **kwargs):
|
||||
|
||||
terms = utils.listify_lookup_plugin_terms(terms, self.basedir, inject)
|
||||
|
||||
result = None
|
||||
|
||||
for term in terms:
|
||||
if isinstance(term, dict):
|
||||
files = term.get('files', [])
|
||||
|
||||
Reference in New Issue
Block a user