1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix name/package parameter convert when passed list of values using with_items. (#3556)

This commit is contained in:
dimid 2016-12-01 10:19:32 +02:00 committed by Matt Clay
parent c3c2427cbb
commit 0c320e1c17

View file

@ -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: