ansible / ansible.builtin / v2.3.3.0-1 / module / nxos_gir Trigger a graceful removal or insertion (GIR) of the switch. | "added in version" 2.2 of ansible.builtin" Authors: Gabriele Gerbino (@GGabriele) preview | supported by communityansible.builtin.nxos_gir (v2.3.3.0-1) — module
pip
Install with pip install ansible==2.3.3.0.post1
Trigger a graceful removal or insertion (GIR) of the switch.
# Trigger system maintenance mode - nxos_gir: system_mode_maintenance: true host: "{{ inventory_hostname }}" username: "{{ un }}" password: "{{ pwd }}"
# Trigger system normal mode - nxos_gir: system_mode_maintenance: false host: "{{ inventory_hostname }}" username: "{{ un }}" password: "{{ pwd }}"
# Configure on-reload reset-reason for maintenance mode - 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 - 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 - 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 - nxos_gir: system_mode_maintenance_timeout: 30 state: present host: "{{ inventory_hostname }}" username: "{{ un }}" password: "{{ pwd }}"
# Remove timeout for maintenance mode - nxos_gir: system_mode_maintenance_timeout: 30 state: absent host: "{{ inventory_hostname }}" username: "{{ un }}" password: "{{ pwd }}"
state: choices: - present - absent default: present description: - Specify desired state of the resource. required: true system_mode_maintenance: choices: - 'true' - 'false' default: null description: - When C(system_mode_maintenance=true) it puts all enabled protocols in maintenance mode (using the isolate command). When C(system_mode_maintenance=false) it puts all enabled protocols in normal mode (using the no isolate command). required: false system_mode_maintenance_timeout: default: null description: - Keeps the switch in maintenance mode for a specified number of minutes. Range is 5-65535. required: false system_mode_maintenance_shutdown: choices: - 'true' - 'false' default: null description: - Shuts down all protocols, vPC domains, and interfaces except the management interface (using the shutdown command). This option is disruptive while C(system_mode_maintenance) (which uses the isolate command) is not. required: false system_mode_maintenance_dont_generate_profile: choices: - 'true' - 'false' default: null description: - When C(system_mode_maintenance_dont_generate_profile=true) it prevents the dynamic searching of enabled protocols and executes commands configured in a maintenance-mode profile. Use this option if you want the system to use a maintenance-mode profile that you have created. When C(system_mode_maintenance_dont_generate_profile=false) it prevents the dynamic searching of enabled protocols and executes commands configured in a normal-mode profile. Use this option if you want the system to use a normal-mode profile that you have created. required: false system_mode_maintenance_on_reload_reset_reason: choices: - hw_error - svc_failure - kern_failure - wdog_timeout - fatal_error - lc_failure - match_any - manual_reload default: null description: - Boots the switch into maintenance mode automatically in the event of a specified system crash. required: false
changed: description: check to see if a change was made on the device returned: always sample: true type: boolean final_system_mode: description: describe the last system mode returned: verbose mode sample: normal type: string updates: description: commands sent to the device returned: verbose mode sample: - terminal dont-ask - system mode maintenance timeout 10 type: list