mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
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:
parent
0196b6bb69
commit
a727930f07
31 changed files with 85 additions and 254 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue