From 0c320e1c170fbe4a0fac54ada75533bafa05a0a2 Mon Sep 17 00:00:00 2001 From: dimid Date: Thu, 1 Dec 2016 10:19:32 +0200 Subject: [PATCH] Fix name/package parameter convert when passed list of values using with_items. (#3556) --- lib/ansible/modules/extras/packaging/os/portage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/extras/packaging/os/portage.py b/lib/ansible/modules/extras/packaging/os/portage.py index a7f43182cdc..2880902fb9a 100644 --- a/lib/ansible/modules/extras/packaging/os/portage.py +++ b/lib/ansible/modules/extras/packaging/os/portage.py @@ -434,7 +434,7 @@ portage_absent_states = ['absent', 'unmerged', 'removed'] def main(): module = AnsibleModule( argument_spec=dict( - package=dict(default=None, aliases=['name']), + package=dict(default=None, aliases=['name'], type='list'), state=dict( default=portage_present_states[0], choices=portage_present_states + portage_absent_states, @@ -475,7 +475,7 @@ def main(): packages = [] if p['package']: - packages.extend(p['package'].split(',')) + packages.extend(p['package']) if p['depclean']: if packages and p['state'] not in portage_absent_states: