dcnm_image_upgrade
Details
- author
- Allen Robel (@quantumonion)
- description
- Stage, validate, upgrade images.
- Attach, detach, image policies.
- Query device issu details.
- short_description
- Image management for Nexus switches
- version_added
options
Details
config
Details
- description
- A dictionary containing the image policy configuration.
- required
options
Details
- description
- A dictionary containing options for each of the upgrade types
epld
Details
- description
- A dictionary containing epld upgrade options
golden
Details
- default
- description
- Enable (True) or disable (False) reverting to the golden EPLD image
- required
- type
module
Details
- default
- description
- The switch module to upgrade
- Choose between ALL, or integer values
- required
- type
- type
nxos
Details
- description
- A dictionary containing nxos upgrade options
bios_force
Details
- default
- description
- required
- type
mode
Details
- default
- description
- nxos upgrade mode
- Choose between distruptive, non_disruptive, force_non_disruptive
- required
- type
- type
package
Details
- description
- A dictionary containing package upgrade options
install
Details
- default
- description
- required
- type
uninstall
Details
- default
- description
- required
- type
- type
reboot
Details
- description
- A dictionary containing reboot options
config_reload
Details
- default
- description
- required
- type
write_erase
Details
- default
- description
- Erase the startup configuration
- required
- type
- type
- type
policy
Details
- description
- required
- type
reboot
Details
- default
- description
- Reboot the switch after upgrade
- required
- type
stage
Details
- default
- description
- Stage (True) or unstage (False) an image policy
- required
- type
switches
Details
- description
- A list of devices to attach the image policy to.
- elements
- required
ip_address
Details
- description
- The IP address of the device to which the policy will be attached.
- required
- type
options
Details
- description
- A dictionary containing options for each of the upgrade types
epld
Details
- description
- A dictionary containing epld upgrade options
# golden
Details
- default
- description
- Enable (True) or disable (False) reverting to the golden EPLD image
- required
- type
# module
Details
- default
- description
- The switch module to upgrade
- Choose between ALL, or integer values
- required
- type
- type
nxos
Details
- description
- A dictionary containing nxos upgrade options
# bios_force
Details
- default
- description
- required
- type
# mode
Details
- default
- description
- nxos upgrade mode
- Choose between distruptive, non_disruptive, force_non_disruptive
- required
- type
- type
package
Details
- description
- A dictionary containing package upgrade options
# install
Details
- default
- description
- required
- type
# uninstall
Details
- default
- description
- required
- type
- type
reboot
Details
- description
- A dictionary containing reboot options
# config_reload
Details
- default
- description
- required
- type
# write_erase
Details
- default
- description
- Erase the startup configuration
- required
- type
- type
- type
policy
Details
- description
- required
- type
reboot
Details
- default
- description
- Reboot the switch after upgrade
- required
- type
stage
Details
- default
- description
- Stage (True) or unstage (False) an image policy
- required
- type
upgrade
Details
- description
- A dictionary containing upgrade toggles for nxos and epld
epld
Details
- default
- description
- Enable (True) or disable (False) EPLD upgrade
- If upgrade.nxos is false, epld and packages cannot both be true
- If epld is true, nxos_option must be disruptive
- required
- type
nxos
Details
- default
- description
- Enable (True) or disable (False) image upgrade
- required
- type
- type
validate
Details
- default
- description
- Validate (True) or do not validate (False) the image
- after staging
- required
- type
- type
upgrade
Details
- description
- A dictionary containing upgrade toggles for nxos and epld
epld
Details
- default
- description
- Enable (True) or disable (False) EPLD upgrade
- If upgrade.nxos is false, epld and packages cannot both be true
- If epld is true, options.nxos.mode must be set to disruptive
- required
- type
nxos
Details
- default
- description
- Enable (True) or disable (False) image upgrade
- required
- type
- type
validate
Details
- default
- description
- Validate (True) or do not validate (False) the image after staging.
- If True, triggers NX-OS to validate that the image is compatible with the switch platform hardware.
- required
- type
- type
state
Details
- choices
- default
- description
- The state of the feature or object after module completion.
- I(merged), I(deleted), and I(query) states are supported.
- type
Examples
Details
---
# This module supports the following states:
# merged:
# Attach image policy to one or more devices.
# Stage image on one or more devices.
# Validate image on one or more devices.
# Upgrade image on one or more devices.
# query:
# Return ISSU details for one or more devices.
# deleted:
# Delete image policy from one or more devices
# Attach image policy NR3F to two devices
# Stage and validate the image on two devices but do not upgrade
- name: stage/validate images
cisco.dcnm.dcnm_image_upgrade:
state: merged
config:
policy: NR3F
stage: true
validate: true
upgrade:
nxos: false
epld: false
switches:
- ip_address: 192.168.1.1
- ip_address: 192.168.1.2
# Attach image policy NR1F to device 192.168.1.1
# Attach image policy NR2F to device 192.168.1.2
# Stage the image on device 192.168.1.1, but do not upgrade
# Stage the image and upgrade device 192.168.1.2
- name: stage/upgrade devices
cisco.dcnm.dcnm_image_upgrade:
state: merged
config:
validate: false
stage: false
upgrade:
nxos: false
epld: false
options:
nxos:
mode: disruptive
epld:
module: ALL
golden: false
switches:
- ip_address: 192.168.1.1
policy: NR1F
stage: true
validate: true
upgrade:
nxos: true
epld: false
- ip_address: 192.168.1.2
policy: NR2F
stage: true
validate: true
upgrade:
nxos: true
epld: true
options:
nxos:
mode: disruptive
epld:
module: ALL
golden: false
# Detach image policy NR3F from two devices
- name: stage/upgrade devices
cisco.dcnm.dcnm_image_upgrade:
state: deleted
config:
policy: NR3F
switches:
- ip_address: 192.168.1.1
- ip_address: 192.168.1.2
# Query ISSU details for three devices
- name: query switch ISSU status
cisco.dcnm.dcnm_image_upgrade:
state: query
config:
policy: KMR5
switches:
- ip_address: 192.168.1.1
policy: OR1F
- ip_address: 192.168.1.2
policy: NR2F
- ip_address: 192.168.1.3 # will query policy KMR5
register: result
- name: print result
ansible.builtin.debug:
var: result