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:
parent
c3c2427cbb
commit
0c320e1c17
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue