From 3c401f9ba238ad5719b7784bad7961d6b02bbe63 Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Mon, 27 Feb 2017 20:22:42 -0500 Subject: [PATCH] add common arguments to eos_banner (#22024) fixes #22015 --- lib/ansible/modules/network/eos/eos_banner.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/ansible/modules/network/eos/eos_banner.py b/lib/ansible/modules/network/eos/eos_banner.py index 2279ec80622..6965b7caf9c 100644 --- a/lib/ansible/modules/network/eos/eos_banner.py +++ b/lib/ansible/modules/network/eos/eos_banner.py @@ -94,6 +94,7 @@ session_name: """ from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.eos import load_config, run_commands +from ansible.module_utils.eos import eos_argument_spec, check_args def map_obj_to_commands(updates, module): commands = list() @@ -139,13 +140,20 @@ def main(): state=dict(default='present', choices=['present', 'absent']) ) + argument_spec.update(eos_argument_spec) + required_if = [('state', 'present', ('text',))] module = AnsibleModule(argument_spec=argument_spec, required_if=required_if, 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)