mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
Only run yum,apt through the with_items loop if there is a list of items. Just a cosmetic fix on return values
for the most part.
This commit is contained in:
parent
2f6d6ccb5a
commit
c82f06258c
3 changed files with 2 additions and 2 deletions
|
@ -488,7 +488,7 @@ class Runner(object):
|
|||
if type(items) != list:
|
||||
raise errors.AnsibleError("with_items only takes a list: %s" % items)
|
||||
|
||||
if self.module_name in [ 'apt', 'yum' ]:
|
||||
if len(items) and self.module_name in [ 'apt', 'yum' ]:
|
||||
# hack for apt and soon yum, with_items maps back into a single module call
|
||||
inject['item'] = ",".join(items)
|
||||
items = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue