Trigger a graceful removal or insertion (GIR) of the switch.
Version added: 1.0.0
- Trigger a graceful removal or insertion (GIR) of the switch.
- GIR processing may take more than 2 minutes. Timeout settings are automatically extended to 200s when user timeout settings are insufficient.
Note
- Tested against NXOSv 7.3.(0)D1(1) on VIRL
- Unsupported for Cisco MDS
state
has effect only in combination withsystem_mode_maintenance_timeout
orsystem_mode_maintenance_on_reload_reset_reason
.- Using
system_mode_maintenance
andsystem_mode_maintenance_dont_generate_profile
would make the module fail, but the system mode will be triggered anyway. - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
- For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
- For more information on using Ansible to manage Cisco devices see the Cisco integration page.
# Trigger system maintenance mode
- cisco.nxos.nxos_gir:
system_mode_maintenance: true
host: '{{ inventory_hostname }}'
username: '{{ un }}'
password: '{{ pwd }}'
# Trigger system normal mode
- cisco.nxos.nxos_gir:
system_mode_maintenance: false
host: '{{ inventory_hostname }}'
username: '{{ un }}'
password: '{{ pwd }}'
# Configure on-reload reset-reason for maintenance mode
- cisco.nxos.nxos_gir:
system_mode_maintenance_on_reload_reset_reason: manual_reload
state: present
host: '{{ inventory_hostname }}'
username: '{{ un }}'
password: '{{ pwd }}'
# Add on-reload reset-reason for maintenance mode
- cisco.nxos.nxos_gir:
system_mode_maintenance_on_reload_reset_reason: hw_error
state: present
host: '{{ inventory_hostname }}'
username: '{{ un }}'
password: '{{ pwd }}'
# Remove on-reload reset-reason for maintenance mode
- cisco.nxos.nxos_gir:
system_mode_maintenance_on_reload_reset_reason: manual_reload
state: absent
host: '{{ inventory_hostname }}'
username: '{{ un }}'
password: '{{ pwd }}'
# Set timeout for maintenance mode
- cisco.nxos.nxos_gir:
system_mode_maintenance_timeout: 30
state: present
host: '{{ inventory_hostname }}'
username: '{{ un }}'
password: '{{ pwd }}'
# Remove timeout for maintenance mode
- cisco.nxos.nxos_gir:
system_mode_maintenance_timeout: 30
state: absent
host: '{{ inventory_hostname }}'
username: '{{ un }}'
password: '{{ pwd }}'
Common return values are documented here, the following are the fields unique to this module:
- Gabriele Gerbino (@GGabriele)