Remove deprecated params from module argspec nxos modules (#34911)

* Remove deprecated param from module argspec nxos modules

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix nxos_vrrp syntaxerror

* Add choices for version _nxos_ip_interface

* remove check_args function

* remove include_defaults
This commit is contained in:
Trishna Guha 2018-01-16 18:23:58 +05:30 committed by GitHub
commit a727930f07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 85 additions and 254 deletions

View file

@ -47,9 +47,6 @@ options:
EXAMPLES = '''
- nxos_reboot:
confirm: true
host: "{{ inventory_hostname }}"
username: "{{ username }}"
password: "{{ password }}"
'''
RETURN = '''
@ -74,7 +71,9 @@ def reboot(module):
def main():
argument_spec = {}
argument_spec = dict(
confirm=dict(default=False, type='bool')
)
argument_spec.update(nxos_argument_spec)
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
@ -83,9 +82,10 @@ def main():
check_args(module, warnings)
results = dict(changed=False, warnings=warnings)
if not module.check_mode:
reboot(module)
results['changed'] = True
if module.params['confirm']:
if not module.check_mode:
reboot(module)
results['changed'] = True
module.exit_json(**results)