zypper: handle lists of packages efficiently

This commit is contained in:
Kristofor Varhus
2014-09-02 09:38:30 -04:00
parent a0635ebb0d
commit acd37c87a9
2 changed files with 65 additions and 42 deletions

View File

@@ -667,7 +667,7 @@ class Runner(object):
if type(items) != list:
raise errors.AnsibleError("lookup plugins have to return a list: %r" % items)
if len(items) and utils.is_list_of_strings(items) and self.module_name in [ 'apt', 'yum', 'pkgng' ]:
if len(items) and utils.is_list_of_strings(items) and self.module_name in [ 'apt', 'yum', 'pkgng', 'zypper' ]:
# hack for apt, yum, and pkgng so that with_items maps back into a single module call
use_these_items = []
for x in items: