Note
This module is part of the cisco.nxos collection (version 9.4.0).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install cisco.nxos.
To use it in a playbook, specify: cisco.nxos.nxos_install_os.
New in cisco.nxos 1.0.0
Parameter | Comments |
|---|---|
issu string | Upgrade using In Service Software Upgrade (ISSU). (Supported on N5k, N7k, N9k platforms) Selecting ‘required’ or ‘yes’ means that upgrades will only proceed if the switch is capable of ISSU. Selecting ‘desired’ means that upgrades will use ISSU if possible but will fall back to disruptive upgrade if needed. Selecting ‘no’ means do not use ISSU. Forced disruptive. Choices:
|
kickstart_image_file string | Name of the kickstart image file on flash. (Not required on all Nexus platforms) |
system_image_file string / required | Name of the system (or combined) image file on flash. |
Note
- name: Install OS on N9k
check_mode: false
cisco.nxos.nxos_install_os:
system_image_file: nxos.7.0.3.I6.1.bin
issu: desired
- name: Wait for device to come back up with new image
wait_for:
port: 22
state: started
timeout: 500
delay: 60
host: '{{ inventory_hostname }}'
- name: Check installed OS for newly installed version
nxos_command:
commands: [show version | json]
register: output
- assert:
that:
- output['stdout'][0]['kickstart_ver_str'] == '7.0(3)I6(1)'
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
install_state dictionary | Boot and install information. Returned: always Sample: |
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/cisco/nxos/nxos_install_os_module.html