mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Make all lookup plugins work with lists
Lookup plugins should accept a string or a list, and always return a list, even if it is just one item.
This commit is contained in:
@@ -21,7 +21,6 @@ class LookupModule(object):
|
||||
pass
|
||||
|
||||
def run(self, terms, **kwargs):
|
||||
return terms
|
||||
|
||||
|
||||
|
||||
if isinstance(terms, basestring):
|
||||
terms = [ terms ]
|
||||
return [term for term in terms]
|
||||
|
||||
Reference in New Issue
Block a user