mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
now with_items also accepts sets
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
This commit is contained in:
parent
fcb760c36c
commit
ff024b65b2
1 changed files with 2 additions and 2 deletions
|
@ -36,8 +36,8 @@ class LookupModule(object):
|
||||||
def run(self, terms, inject=None, **kwargs):
|
def run(self, terms, inject=None, **kwargs):
|
||||||
terms = utils.listify_lookup_plugin_terms(terms, self.basedir, inject)
|
terms = utils.listify_lookup_plugin_terms(terms, self.basedir, inject)
|
||||||
|
|
||||||
if not isinstance(terms, list):
|
if not isinstance(terms, list) and not isinstance(terms,set):
|
||||||
raise errors.AnsibleError("with_items expects a list")
|
raise errors.AnsibleError("with_items expects a list or a set")
|
||||||
|
|
||||||
return flatten(terms)
|
return flatten(terms)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue