From ff024b65b2120d1f4c182f3dfa7fca8cc2fd122f Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Sat, 1 Feb 2014 17:54:41 -0500 Subject: [PATCH] now with_items also accepts sets Signed-off-by: Brian Coca --- lib/ansible/runner/lookup_plugins/items.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/runner/lookup_plugins/items.py b/lib/ansible/runner/lookup_plugins/items.py index c2175211291..85e77d5380d 100644 --- a/lib/ansible/runner/lookup_plugins/items.py +++ b/lib/ansible/runner/lookup_plugins/items.py @@ -36,8 +36,8 @@ class LookupModule(object): def run(self, terms, inject=None, **kwargs): terms = utils.listify_lookup_plugin_terms(terms, self.basedir, inject) - if not isinstance(terms, list): - raise errors.AnsibleError("with_items expects a list") + if not isinstance(terms, list) and not isinstance(terms,set): + raise errors.AnsibleError("with_items expects a list or a set") return flatten(terms)