| 1 |
.. _redfish_firmware_rollback_module: |
| 2 |
|
| 3 |
|
| 4 |
redfish_firmware_rollback -- To perform a component firmware rollback using component name |
| 5 |
========================================================================================== |
| 6 |
|
| 7 |
.. contents:: |
| 8 |
:local: |
| 9 |
:depth: 1 |
| 10 |
|
| 11 |
|
| 12 |
Synopsis |
| 13 |
-------- |
| 14 |
|
| 15 |
This module allows to rollback the firmware of different server components. |
| 16 |
|
| 17 |
Depending on the component, the firmware update is applied after an automatic or manual reboot. |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
Requirements |
| 22 |
------------ |
| 23 |
The below requirements are needed on the host that executes this module. |
| 24 |
|
| 25 |
- python \>= 3.9.6 |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
Parameters |
| 30 |
---------- |
| 31 |
|
| 32 |
name (True, str, None) |
| 33 |
The name or regular expression of the component to match and is case-sensitive. |
| 34 |
|
| 35 |
|
| 36 |
reboot (optional, bool, True) |
| 37 |
Reboot the server to apply the previous version of the firmware. |
| 38 |
|
| 39 |
\ :literal:`true`\ reboots the server to rollback the firmware to the available version. |
| 40 |
|
| 41 |
\ :literal:`false`\ schedules the rollback of firmware until the next restart. |
| 42 |
|
| 43 |
When \ :emphasis:`reboot`\ is \ :literal:`false`\ , some components update immediately, and the server may reboot. So, the module must wait till the server is accessible. |
| 44 |
|
| 45 |
|
| 46 |
reboot_timeout (optional, int, 900) |
| 47 |
Wait time in seconds. The module waits for this duration till the server reboots. |
| 48 |
|
| 49 |
|
| 50 |
baseuri (True, str, None) |
| 51 |
IP address of the target out-of-band controller. For example- \<ipaddress\>:\<port\>. |
| 52 |
|
| 53 |
|
| 54 |
username (False, str, None) |
| 55 |
Username of the target out-of-band controller. |
| 56 |
|
| 57 |
If the username is not provided, then the environment variable \ :envvar:`IDRAC\_USERNAME`\ is used. |
| 58 |
|
| 59 |
Example: export IDRAC\_USERNAME=username |
| 60 |
|
| 61 |
|
| 62 |
password (False, str, None) |
| 63 |
Password of the target out-of-band controller. |
| 64 |
|
| 65 |
If the password is not provided, then the environment variable \ :envvar:`IDRAC\_PASSWORD`\ is used. |
| 66 |
|
| 67 |
Example: export IDRAC\_PASSWORD=password |
| 68 |
|
| 69 |
|
| 70 |
x_auth_token (False, str, None) |
| 71 |
Authentication token. |
| 72 |
|
| 73 |
If the x\_auth\_token is not provided, then the environment variable \ :envvar:`IDRAC\_X\_AUTH\_TOKEN`\ is used. |
| 74 |
|
| 75 |
Example: export IDRAC\_X\_AUTH\_TOKEN=x\_auth\_token |
| 76 |
|
| 77 |
|
| 78 |
validate_certs (optional, bool, True) |
| 79 |
If \ :literal:`false`\ , the SSL certificates will not be validated. |
| 80 |
|
| 81 |
Configure \ :literal:`false`\ only on personally controlled sites where self-signed certificates are used. |
| 82 |
|
| 83 |
Prior to collection version \ :literal:`5.0.0`\ , the \ :emphasis:`validate\_certs`\ is \ :literal:`false`\ by default. |
| 84 |
|
| 85 |
|
| 86 |
ca_path (optional, path, None) |
| 87 |
The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. |
| 88 |
|
| 89 |
|
| 90 |
timeout (optional, int, 30) |
| 91 |
The socket level timeout in seconds. |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
Notes |
| 98 |
----- |
| 99 |
|
| 100 |
.. note:: |
| 101 |
- Run this module from a system that has direct access to Redfish APIs. |
| 102 |
- For components that do not require a reboot, firmware rollback proceeds irrespective of \ :emphasis:`reboot`\ is \ :literal:`true`\ or \ :literal:`false`\ . |
| 103 |
- This module supports IPv4 and IPv6 addresses. |
| 104 |
- This module supports \ :literal:`check\_mode`\ . |
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
Examples |
| 110 |
-------- |
| 111 |
|
| 112 |
.. code-block:: yaml+jinja |
| 113 |
|
| 114 |
|
| 115 |
--- |
| 116 |
- name: Rollback a BIOS component firmware |
| 117 |
dellemc.openmanage.redfish_firmware_rollback: |
| 118 |
baseuri: "192.168.0.1" |
| 119 |
username: "user_name" |
| 120 |
password: "user_password" |
| 121 |
ca_path: "/path/to/ca_cert.pem" |
| 122 |
name: "BIOS" |
| 123 |
|
| 124 |
- name: Rollback all NIC cards with a name starting from 'Broadcom Gigabit'. |
| 125 |
dellemc.openmanage.redfish_firmware_rollback: |
| 126 |
baseuri: "192.168.0.1:443" |
| 127 |
username: "user_name" |
| 128 |
password: "user_password" |
| 129 |
ca_path: "/path/to/ca_cert.pem" |
| 130 |
name: "Broadcom Gigabit Ethernet.*" |
| 131 |
|
| 132 |
- name: Rollback all the component firmware except BIOS component. |
| 133 |
dellemc.openmanage.redfish_firmware_rollback: |
| 134 |
baseuri: "192.168.0.1:443" |
| 135 |
username: "user_name" |
| 136 |
password: "user_password" |
| 137 |
ca_path: "/path/to/ca_cert.pem" |
| 138 |
name: "(?!BIOS).*" |
| 139 |
|
| 140 |
- name: Rollback all the available firmware component. |
| 141 |
dellemc.openmanage.redfish_firmware_rollback: |
| 142 |
baseuri: "192.168.0.1:443" |
| 143 |
username: "user_name" |
| 144 |
password: "user_password" |
| 145 |
ca_path: "/path/to/ca_cert.pem" |
| 146 |
name: ".*" |
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
Return Values |
| 151 |
------------- |
| 152 |
|
| 153 |
msg (always, str, Successfully completed the job for firmware rollback.) |
| 154 |
Overall firmware rollback status. |
| 155 |
|
| 156 |
|
| 157 |
status (success, list, [{'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': None}]) |
| 158 |
Firmware rollback job and progress details from the iDRAC. |
| 159 |
|
| 160 |
|
| 161 |
error_info (on http error, dict, {'error': {'@Message.ExtendedInfo': [{'Message': 'InstanceID value provided for the update operation is invalid', 'MessageArgs': [], '[email protected]': 0, 'MessageId': 'IDRAC.2.8.SUP024', 'RelatedProperties': [], '[email protected]': 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'}}) |
| 162 |
Details of the HTTP error. |
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
Status |
| 169 |
------ |
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
Authors |
| 176 |
~~~~~~~ |
| 177 |
|
| 178 |
- Felix Stephen (@felixs88) |
| 179 |
|