mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
fix vyos_user aggregate (#28317)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
parent
403f6db53f
commit
2e211078ce
2 changed files with 15 additions and 7 deletions
|
@ -27,7 +27,7 @@ DOCUMENTATION = """
|
|||
---
|
||||
module: vyos_user
|
||||
version_added: "2.4"
|
||||
author: "Trishna Guha (@trishnag)"
|
||||
author: "Trishna Guha (@trishnaguha)"
|
||||
short_description: Manage the collection of local users on VyOS device
|
||||
description:
|
||||
- This module provides declarative management of the local usernames
|
||||
|
@ -231,18 +231,18 @@ def map_params_to_obj(module):
|
|||
if not module.params['name'] and module.params['purge']:
|
||||
return list()
|
||||
else:
|
||||
aggregate = [{'name': module.params['name']}]
|
||||
aggregatelist = [{'name': module.params['name']}]
|
||||
else:
|
||||
aggregate = list()
|
||||
aggregatelist = list()
|
||||
for item in aggregate:
|
||||
if not isinstance(item, dict):
|
||||
aggregate.append({'name': item})
|
||||
aggregatelist.append({'name': item})
|
||||
else:
|
||||
aggregate.append(item)
|
||||
aggregatelist.append(item)
|
||||
|
||||
objects = list()
|
||||
|
||||
for item in aggregate:
|
||||
for item in aggregatelist:
|
||||
get_value = partial(get_param_value, item=item, module=module)
|
||||
item['password'] = get_value('password')
|
||||
item['full_name'] = get_value('full_name')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue