dellemc.openmanage.redfish_firmware_rollback module – To perform a component firmware rollback using component name

Note

This module is part of the dellemc.openmanage collection (version 8.7.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 dellemc.openmanage. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: dellemc.openmanage.redfish_firmware_rollback.

New in dellemc.openmanage 8.2.0

Synopsis

  • This module allows to rollback the firmware of different server components.

  • Depending on the component, the firmware update is applied after an automatic or manual reboot.

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.9.6

Parameters

Parameter

Comments

baseuri

string / required

IP address of the target out-of-band controller. For example- <ipaddress>:<port>.

ca_path

path

added in dellemc.openmanage 5.0.0

The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.

name

string / required

The name or regular expression of the component to match and is case-sensitive.

password

string / required

Password of the target out-of-band controller.

If the password is not provided, then the environment variable IDRAC_PASSWORD is used.

Example: export IDRAC_PASSWORD=password

reboot

boolean

Reboot the server to apply the previous version of the firmware.

true reboots the server to rollback the firmware to the available version.

false schedules the rollback of firmware until the next restart.

When reboot is false, some components update immediately, and the server may reboot. So, the module must wait till the server is accessible.

Choices:

  • false

  • true ← (default)

reboot_timeout

integer

Wait time in seconds. The module waits for this duration till the server reboots.

Default: 900

timeout

integer

added in dellemc.openmanage 5.0.0

The socket level timeout in seconds.

Default: 30

username

string / required

Username of the target out-of-band controller.

If the username is not provided, then the environment variable IDRAC_USERNAME is used.

Example: export IDRAC_USERNAME=username

validate_certs

boolean

added in dellemc.openmanage 5.0.0

If false, the SSL certificates will not be validated.

Configure false only on personally controlled sites where self-signed certificates are used.

Prior to collection version 5.0.0, the validate_certs is false by default.

Choices:

  • false

  • true ← (default)

Notes

Note

  • Run this module from a system that has direct access to Redfish APIs.

  • For components that do not require a reboot, firmware rollback proceeds irrespective of reboot is true or false.

  • This module supports IPv4 and IPv6 addresses.

  • This module supports check_mode.

Examples

---
- name: Rollback a BIOS component firmware
  dellemc.openmanage.redfish_firmware_rollback:
    baseuri: "192.168.0.1"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    name: "BIOS"

- name: Rollback all NIC cards with a name starting from 'Broadcom Gigabit'.
  dellemc.openmanage.redfish_firmware_rollback:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    name: "Broadcom Gigabit Ethernet.*"

- name: Rollback all the component firmware except BIOS component.
  dellemc.openmanage.redfish_firmware_rollback:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    name: "(?!BIOS).*"

- name: Rollback all the available firmware component.
  dellemc.openmanage.redfish_firmware_rollback:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    name: ".*"

Return Values

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

Key

Description

error_info

dictionary

Details of the HTTP error.

Returned: on http error

Sample: {"error": {"@Message.ExtendedInfo": [{"Message": "InstanceID value provided for the update operation is invalid", "MessageArgs": [], "MessageArgs@odata.count": 0, "MessageId": "IDRAC.2.8.SUP024", "RelatedProperties": [], "RelatedProperties@odata.count": 0, "Resolution": "Enumerate inventory, copy the InstanceID value and provide that value for the update operation.", "Severity": "Warning"}], "code": "Base.1.12.GeneralError", "message": "A general error has occurred. See ExtendedInfo for more information"}}

msg

string

Overall firmware rollback status.

Returned: always

Sample: "Successfully completed the job for firmware rollback."

status

list / elements=string

Firmware rollback job and progress details from the iDRAC.

Returned: success

Sample: [{"ActualRunningStartTime": "2023-08-04T12:26:55", "ActualRunningStopTime": "2023-08-04T12:32:35", "CompletionTime": "2023-08-04T12:32:35", "Description": "Job Instance", "EndTime": "TIME_NA", "Id": "JID_911698303631", "JobState": "Completed", "JobType": "FirmwareUpdate", "Message": "Job completed successfully.", "MessageArgs": [], "MessageId": "PR19", "Name": "Firmware Rollback: Firmware", "PercentComplete": 100, "StartTime": "2023-08-04T12:23:50", "TargetSettingsURI": null}]

Authors

  • Felix Stephen (@felixs88)