cisco.nxos.nxos_rpm module – Install patch or feature rpms on Cisco NX-OS devices.

Note

This module is part of the cisco.nxos collection (version 4.0.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_rpm.

New in cisco.nxos 1.0.0

Synopsis

  • Install software maintenance upgrade (smu) RPMS and 3rd party RPMS on Cisco NX-OS devices.

Note

This module has a corresponding action plugin.

Parameters

Parameter

Comments

aggregate

list / elements=dictionary

List of RPM/patch definitions.

file_system

string

The remote file system of the device. If omitted, devices that support a file_system parameter will use their default values.

pkg

string / required

Name of the RPM package.

state

string

If the state is present, the rpm will be installed, If the state is absent, it will be removed.

Choices:

  • "present"

  • "absent"

file_system

string

The remote file system of the device. If omitted, devices that support a file_system parameter will use their default values.

Default: "bootflash"

pkg

string

Name of the RPM package.

state

string

If the state is present, the rpm will be installed, If the state is absent, it will be removed.

Choices:

  • "present" ← (default)

  • "absent"

Notes

Note

  • Tested against NXOSv 7.0(3)I2(5), 7.0(3)I4(6), 7.0(3)I5(3), 7.0(3)I6(1), 7.0(3)I7(3)

  • Unsupported for Cisco MDS

  • For patches, the minimum platform version needed is 7.0(3)I2(5)

  • For feature rpms, the minimum platform version needed is 7.0(3)I6(1)

  • The module manages the entire RPM lifecycle (Add, activate, commit, deactivate, remove)

  • For reload patches, this module is NOT idempotent until the patch is committed.

  • 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 <https://www.ansible.com/integrations/networks/cisco>`_.

Examples

- cisco.nxos.nxos_rpm:
    pkg: nxos.sample-n9k_ALL-1.0.0-7.0.3.I7.3.lib32_n9000.rpm

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

commands

list / elements=string

commands sent to the device

Returned: always

Sample: ["install add bootflash:nxos.sample-n9k_ALL-1.0.0-7.0.3.I7.3.lib32_n9000.rpm forced", "install activate nxos.sample-n9k_ALL-1.0.0-7.0.3.I7.3.lib32_n9000 forced", "install commit nxos.sample-n9k_ALL-1.0.0-7.0.3.I7.3.lib32_n9000"]

Authors

  • Sai Chintalapudi (@saichint)