|
|
|
@ -25,12 +25,12 @@ description:
|
|
|
|
|
current running config. It also supports purging usernames from the
|
|
|
|
|
configuration that are not explicitly defined.
|
|
|
|
|
options:
|
|
|
|
|
users:
|
|
|
|
|
aggregate:
|
|
|
|
|
description:
|
|
|
|
|
- The set of username objects to be configured on the remote
|
|
|
|
|
Cisco IOS XR device. The list entries can either be the username
|
|
|
|
|
or a hash of username and properties. This argument is mutually
|
|
|
|
|
exclusive with the C(name) argument, alias C(aggregate).
|
|
|
|
|
exclusive with the C(name) argument, alias C(users).
|
|
|
|
|
name:
|
|
|
|
|
description:
|
|
|
|
|
- The username to be configured on the Cisco IOS XR device.
|
|
|
|
@ -88,7 +88,7 @@ EXAMPLES = """
|
|
|
|
|
purge: yes
|
|
|
|
|
- name: set multiple users to group sys-admin
|
|
|
|
|
iosxr_user:
|
|
|
|
|
users:
|
|
|
|
|
aggregate:
|
|
|
|
|
- name: netop
|
|
|
|
|
- name: netend
|
|
|
|
|
group: sysadmin
|
|
|
|
@ -210,7 +210,7 @@ def get_param_value(key, item, module):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def map_params_to_obj(module):
|
|
|
|
|
users = module.params['users']
|
|
|
|
|
users = module.params['aggregate']
|
|
|
|
|
if not users:
|
|
|
|
|
if not module.params['name'] and module.params['purge']:
|
|
|
|
|
return list()
|
|
|
|
@ -244,7 +244,7 @@ def main():
|
|
|
|
|
""" main entry point for module execution
|
|
|
|
|
"""
|
|
|
|
|
argument_spec = dict(
|
|
|
|
|
users=dict(type='list', aliases=['aggregate']),
|
|
|
|
|
aggregate=dict(type='list', aliases=['users', 'collection']),
|
|
|
|
|
name=dict(),
|
|
|
|
|
|
|
|
|
|
password=dict(no_log=True),
|
|
|
|
@ -257,7 +257,7 @@ def main():
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
argument_spec.update(iosxr_argument_spec)
|
|
|
|
|
mutually_exclusive = [('name', 'users')]
|
|
|
|
|
mutually_exclusive = [('name', 'aggregate')]
|
|
|
|
|
|
|
|
|
|
module = AnsibleModule(argument_spec=argument_spec,
|
|
|
|
|
mutually_exclusive=mutually_exclusive,
|
|
|
|
|