From 0a62d7c1f43cd6e086a00bebc945c1813b3ec721 Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Wed, 22 Feb 2017 20:19:15 -0500 Subject: [PATCH] adds missing argspec to eos_user module (#21806) Updates the eos_user module with the common eos arg spec --- lib/ansible/modules/network/eos/eos_user.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/ansible/modules/network/eos/eos_user.py b/lib/ansible/modules/network/eos/eos_user.py index bed7f9c7b4..51feb3506f 100644 --- a/lib/ansible/modules/network/eos/eos_user.py +++ b/lib/ansible/modules/network/eos/eos_user.py @@ -148,6 +148,7 @@ from functools import partial from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.eos import get_config, load_config from ansible.module_utils.six import iteritems +from ansible.module_utils.eos import eos_argument_spec, check_args def validate_privilege(value, module): if not 1 <= value <= 15: @@ -314,13 +315,20 @@ def main(): state=dict(default='present', choices=['present', 'absent']) ) + argument_spec.update(eos_argument_spec) + mutually_exclusive = [('username', 'users')] module = AnsibleModule(argument_spec=argument_spec, mutually_exclusive=mutually_exclusive, supports_check_mode=True) + warnings = list() + check_args(module, warnings) + result = {'changed': False} + if warnings: + result['warnings'] = warnings want = map_params_to_obj(module) have = map_config_to_obj(module)