dellemc.openmanage.redfish_firmware module – To perform a component firmware update using the image file available on the local or remote system

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.

New in dellemc.openmanage 2.1.0

Synopsis

  • This module allows the firmware update of only one component at a time. If the module is run for more than one component, an error message is returned.

  • 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.8.6

  • urllib3

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.

image_uri

string / required

Firmware Image location URI or local path.

For example- http://%3Cweb_address%3E/components.exe or /home/firmware_repo/component.exe.

job_wait

boolean

Provides the option to wait for job completion.

Choices:

  • false

  • true ← (default)

job_wait_timeout

integer

The maximum wait time of job_wait in seconds. The job is tracked only for this duration.

This option is applicable when job_wait is true.

Note: If a firmware update needs a reboot, the job will get scheduled and waits for no of seconds specfied in job_wait_time. to reduce the wait time either give job_wait_time minimum or make job_waitas false and retrigger.

Default: 3600

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

timeout

integer

added in dellemc.openmanage 5.0.0

The socket level timeout in seconds.

Default: 30

transfer_protocol

string

Protocol used to transfer the firmware image file. Applicable for URI based update.

Choices:

  • "CIFS"

  • "FTP"

  • "HTTP" ← (default)

  • "HTTPS"

  • "NSF"

  • "OEM"

  • "SCP"

  • "SFTP"

  • "TFTP"

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.

  • This module supports both IPv4 and IPv6 addresses.

  • This module supports only iDRAC9 and above.

  • This module does not support check_mode.

Examples

---
- name: Update the firmware from a single executable file available in a HTTP protocol
  dellemc.openmanage.redfish_firmware:
    baseuri: "192.168.0.1"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    image_uri: "http://192.168.0.2/firmware_repo/component.exe"
    transfer_protocol: "HTTP"

- name: Update the firmware from a single executable file available in a HTTP protocol with job_Wait
  dellemc.openmanage.redfish_firmware:
    baseuri: "192.168.0.1"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    image_uri: "http://192.168.0.2/firmware_repo/component.exe"
    transfer_protocol: "HTTP"
    job_wait: true
    job_wait_timeout: 600

- name: Update the firmware from a single executable file available in a local path
  dellemc.openmanage.redfish_firmware:
    baseuri: "192.168.0.1"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    image_uri: "/home/firmware_repo/component.exe"

Return Values

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

Key

Description

error_info

dictionary

Details of http error.

Returned: on http error

Sample: {"error": {"@Message.ExtendedInfo": [{"Message": "Unable to complete the operation because the JSON data format entered is invalid.", "Resolution": "Do the following and the retry the operation: 1) Enter the correct JSON data format and retry the operation. 2) Make sure that no syntax error is present in JSON data format. 3) Make sure that a duplicate key is not present in JSON data format.", "Severity": "Critical"}, {"Message": "The request body submitted was malformed JSON and could not be parsed by the receiving service.", "Resolution": "Ensure that the request body is valid JSON and resubmit the request.", "Severity": "Critical"}], "code": "Base.1.2.GeneralError", "message": "A general error has occurred. See ExtendedInfo for more information."}}

msg

string

Overall status of the firmware update task.

Returned: always

Sample: "Successfully updated the firmware."

task

dictionary

Returns ID and URI of the created task.

Returned: success

Sample: {"id": "JID_XXXXXXXXXXXX", "uri": "/redfish/v1/TaskService/Tasks/JID_XXXXXXXXXXXX"}

Authors

  • Felix Stephen (@felixs88)

  • Husniya Hameed (@husniya_hameed)

  • Shivam Sharma (@Shivam-Sharma)

  • Kritika Bhateja (@Kritika_Bhateja)

  • Abhishek Sinha (@ABHISHEK-SINHA10)