| 1 |
.. _idrac_bios_module: |
| 2 |
|
| 3 |
|
| 4 |
idrac_bios -- Modify and clear BIOS attributes, reset BIOS settings and configure boot sources |
| 5 |
============================================================================================== |
| 6 |
|
| 7 |
.. contents:: |
| 8 |
:local: |
| 9 |
:depth: 1 |
| 10 |
|
| 11 |
|
| 12 |
Synopsis |
| 13 |
-------- |
| 14 |
|
| 15 |
This module allows to modify the BIOS attributes. Also clears pending BIOS attributes and resets BIOS to default settings. |
| 16 |
|
| 17 |
Boot sources can be enabled or disabled. Boot sequence can be configured. |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
Requirements |
| 22 |
------------ |
| 23 |
The below requirements are needed on the host that executes this module. |
| 24 |
|
| 25 |
- omsdk \>= 1.2.490 |
| 26 |
- python \>= 3.9.6 |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
Parameters |
| 31 |
---------- |
| 32 |
|
| 33 |
share_name (optional, str, None) |
| 34 |
(deprecated)Network share or a local path. |
| 35 |
|
| 36 |
|
| 37 |
share_user (optional, str, None) |
| 38 |
(deprecated)Network share user name. Use the format 'user@domain' or domain//user if user is part of a domain. This option is mandatory for CIFS share. |
| 39 |
|
| 40 |
|
| 41 |
share_password (optional, str, None) |
| 42 |
(deprecated)Network share user password. This option is mandatory for CIFS share. |
| 43 |
|
| 44 |
|
| 45 |
share_mnt (optional, str, None) |
| 46 |
(deprecated)Local mount path of the network share with read-write permission for ansible user. This option is mandatory for network shares. |
| 47 |
|
| 48 |
|
| 49 |
apply_time (optional, str, Immediate) |
| 50 |
Apply time of the \ :emphasis:`attributes`\ . |
| 51 |
|
| 52 |
This is applicable only to \ :emphasis:`attributes`\ . |
| 53 |
|
| 54 |
\ :literal:`Immediate`\ Allows the user to immediately reboot the host and apply the changes. \ :emphasis:`job\_wait`\ is applicable. |
| 55 |
|
| 56 |
\ :literal:`OnReset`\ Allows the user to apply the changes on the next reboot of the host server. |
| 57 |
|
| 58 |
\ :literal:`AtMaintenanceWindowStart`\ Allows the user to apply at the start of a maintenance window as specified in \ :emphasis:`maintenance\_window`\ . A reboot job will be scheduled. |
| 59 |
|
| 60 |
\ :literal:`InMaintenanceWindowOnReset`\ Allows to apply after a manual reset but within the maintenance window as specified in \ :emphasis:`maintenance\_window`\ . |
| 61 |
|
| 62 |
|
| 63 |
maintenance_window (optional, dict, None) |
| 64 |
Option to schedule the maintenance window. |
| 65 |
|
| 66 |
This is required when \ :emphasis:`apply\_time`\ is \ :literal:`AtMaintenanceWindowStart`\ or \ :literal:`InMaintenanceWindowOnReset`\ . |
| 67 |
|
| 68 |
|
| 69 |
start_time (True, str, None) |
| 70 |
The start time for the maintenance window to be scheduled. |
| 71 |
|
| 72 |
The format is YYYY-MM-DDThh:mm:ss\<offset\> |
| 73 |
|
| 74 |
\<offset\> is the time offset from UTC that the current timezone set in iDRAC in the format: +05:30 for IST. |
| 75 |
|
| 76 |
|
| 77 |
duration (True, int, None) |
| 78 |
The duration in seconds for the maintenance window. |
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
attributes (optional, dict, None) |
| 83 |
Dictionary of BIOS attributes and value pair. Attributes should be part of the Redfish Dell BIOS Attribute Registry. Use \ https://I(idrac_ip\ /redfish/v1/Systems/System.Embedded.1/Bios) to view the Redfish URI. |
| 84 |
|
| 85 |
This is mutually exclusive with \ :emphasis:`boot\_sources`\ , \ :emphasis:`clear\_pending`\ , and \ :emphasis:`reset\_bios`\ . |
| 86 |
|
| 87 |
|
| 88 |
boot_sources (optional, list, None) |
| 89 |
(deprecated)List of boot devices to set the boot sources settings. |
| 90 |
|
| 91 |
\ :emphasis:`boot\_sources`\ is mutually exclusive with \ :emphasis:`attributes`\ , \ :emphasis:`clear\_pending`\ , and \ :emphasis:`reset\_bios`\ . |
| 92 |
|
| 93 |
\ :emphasis:`job\_wait`\ is not applicable. The module waits till the completion of this task. |
| 94 |
|
| 95 |
This feature is deprecated, please use \ :ref:`dellemc.openmanage.idrac\_boot <ansible_collections.dellemc.openmanage.idrac_boot_module>`\ for configuring boot sources. |
| 96 |
|
| 97 |
|
| 98 |
clear_pending (optional, bool, None) |
| 99 |
Allows the user to clear all pending BIOS attributes changes. |
| 100 |
|
| 101 |
\ :literal:`true`\ will discard any pending changes to bios attributes or remove job if in scheduled state. |
| 102 |
|
| 103 |
This operation will not create any job. |
| 104 |
|
| 105 |
\ :literal:`false`\ will not perform any operation. |
| 106 |
|
| 107 |
This is mutually exclusive with \ :emphasis:`boot\_sources`\ , \ :emphasis:`attributes`\ , and \ :emphasis:`reset\_bios`\ . |
| 108 |
|
| 109 |
\ :literal:`Note`\ Any BIOS job scheduled due to boot sources configuration will not be cleared. |
| 110 |
|
| 111 |
|
| 112 |
reset_bios (optional, bool, None) |
| 113 |
Resets the BIOS to default settings and triggers a reboot of host system. |
| 114 |
|
| 115 |
This is applied to the host after the restart. |
| 116 |
|
| 117 |
This operation will not create any job. |
| 118 |
|
| 119 |
\ :literal:`false`\ will not perform any operation. |
| 120 |
|
| 121 |
This is mutually exclusive with \ :emphasis:`boot\_sources`\ , \ :emphasis:`attributes`\ , and \ :emphasis:`clear\_pending`\ . |
| 122 |
|
| 123 |
When \ :literal:`true`\ , this action will always report as changes found to be applicable. |
| 124 |
|
| 125 |
|
| 126 |
reset_type (optional, str, graceful_restart) |
| 127 |
\ :literal:`force\_restart`\ Forcefully reboot the host system. |
| 128 |
|
| 129 |
\ :literal:`graceful\_restart`\ Gracefully reboot the host system. |
| 130 |
|
| 131 |
This is applicable for \ :emphasis:`reset\_bios`\ , and \ :emphasis:`attributes`\ when \ :emphasis:`apply\_time`\ is \ :literal:`Immediate`\ . |
| 132 |
|
| 133 |
|
| 134 |
job_wait (optional, bool, True) |
| 135 |
Provides the option to wait for job completion. |
| 136 |
|
| 137 |
This is applicable for \ :emphasis:`attributes`\ when \ :emphasis:`apply\_time`\ is \ :literal:`Immediate`\ . |
| 138 |
|
| 139 |
|
| 140 |
job_wait_timeout (optional, int, 1200) |
| 141 |
The maximum wait time of \ :emphasis:`job\_wait`\ in seconds. The job is tracked only for this duration. |
| 142 |
|
| 143 |
This option is applicable when \ :emphasis:`job\_wait`\ is \ :literal:`true`\ . |
| 144 |
|
| 145 |
|
| 146 |
idrac_ip (True, str, None) |
| 147 |
iDRAC IP Address. |
| 148 |
|
| 149 |
|
| 150 |
idrac_user (True, str, None) |
| 151 |
iDRAC username. |
| 152 |
|
| 153 |
If the username is not provided, then the environment variable \ :envvar:`IDRAC\_USERNAME`\ is used. |
| 154 |
|
| 155 |
Example: export IDRAC\_USERNAME=username |
| 156 |
|
| 157 |
|
| 158 |
idrac_password (True, str, None) |
| 159 |
iDRAC user password. |
| 160 |
|
| 161 |
If the password is not provided, then the environment variable \ :envvar:`IDRAC\_PASSWORD`\ is used. |
| 162 |
|
| 163 |
Example: export IDRAC\_PASSWORD=password |
| 164 |
|
| 165 |
|
| 166 |
idrac_port (optional, int, 443) |
| 167 |
iDRAC port. |
| 168 |
|
| 169 |
|
| 170 |
validate_certs (optional, bool, True) |
| 171 |
If \ :literal:`false`\ , the SSL certificates will not be validated. |
| 172 |
|
| 173 |
Configure \ :literal:`false`\ only on personally controlled sites where self-signed certificates are used. |
| 174 |
|
| 175 |
Prior to collection version \ :literal:`5.0.0`\ , the \ :emphasis:`validate\_certs`\ is \ :literal:`false`\ by default. |
| 176 |
|
| 177 |
|
| 178 |
ca_path (optional, path, None) |
| 179 |
The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. |
| 180 |
|
| 181 |
|
| 182 |
timeout (optional, int, 30) |
| 183 |
The socket level timeout in seconds. |
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
Notes |
| 190 |
----- |
| 191 |
|
| 192 |
.. note:: |
| 193 |
- omsdk is required to be installed only for \ :emphasis:`boot\_sources`\ operation. |
| 194 |
- This module requires 'Administrator' privilege for \ :emphasis:`idrac\_user`\ . |
| 195 |
- Run this module from a system that has direct access to Dell iDRAC. |
| 196 |
- This module supports both IPv4 and IPv6 address for \ :emphasis:`idrac\_ip`\ . |
| 197 |
- This module supports \ :literal:`check\_mode`\ . |
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
Examples |
| 203 |
-------- |
| 204 |
|
| 205 |
.. code-block:: yaml+jinja |
| 206 |
|
| 207 |
|
| 208 |
--- |
| 209 |
- name: Configure generic attributes of the BIOS |
| 210 |
dellemc.openmanage.idrac_bios: |
| 211 |
idrac_ip: "192.168.0.1" |
| 212 |
idrac_user: "user_name" |
| 213 |
idrac_password: "user_password" |
| 214 |
ca_path: "/path/to/ca_cert.pem" |
| 215 |
attributes: |
| 216 |
BootMode: "Bios" |
| 217 |
OneTimeBootMode: "Enabled" |
| 218 |
BootSeqRetry: "Enabled" |
| 219 |
|
| 220 |
- name: Configure PXE generic attributes |
| 221 |
dellemc.openmanage.idrac_bios: |
| 222 |
idrac_ip: "192.168.0.1" |
| 223 |
idrac_user: "user_name" |
| 224 |
idrac_password: "user_password" |
| 225 |
ca_path: "/path/to/ca_cert.pem" |
| 226 |
attributes: |
| 227 |
PxeDev1EnDis: "Enabled" |
| 228 |
PxeDev1Protocol: "IPV4" |
| 229 |
PxeDev1VlanEnDis: "Enabled" |
| 230 |
PxeDev1VlanId: 1 |
| 231 |
PxeDev1Interface: "NIC.Embedded.1-1-1" |
| 232 |
PxeDev1VlanPriority: 2 |
| 233 |
|
| 234 |
- name: Configure BIOS attributes at Maintenance window |
| 235 |
dellemc.openmanage.idrac_bios: |
| 236 |
idrac_ip: "192.168.0.1" |
| 237 |
idrac_user: "user_name" |
| 238 |
idrac_password: "user_password" |
| 239 |
ca_path: "/path/to/ca_cert.pem" |
| 240 |
apply_time: AtMaintenanceWindowStart |
| 241 |
maintenance_window: |
| 242 |
start_time: "2022-09-30T05:15:40-05:00" |
| 243 |
duration: 600 |
| 244 |
attributes: |
| 245 |
BootMode: "Bios" |
| 246 |
OneTimeBootMode: "Enabled" |
| 247 |
BootSeqRetry: "Enabled" |
| 248 |
|
| 249 |
- name: Clear pending BIOS attributes |
| 250 |
dellemc.openmanage.idrac_bios: |
| 251 |
idrac_ip: "192.168.0.1" |
| 252 |
idrac_user: "user_name" |
| 253 |
idrac_password: "user_password" |
| 254 |
ca_path: "/path/to/ca_cert.pem" |
| 255 |
clear_pending: true |
| 256 |
|
| 257 |
- name: Reset BIOS attributes to default settings. |
| 258 |
dellemc.openmanage.idrac_bios: |
| 259 |
idrac_ip: "192.168.0.1" |
| 260 |
idrac_user: "user_name" |
| 261 |
idrac_password: "user_password" |
| 262 |
validate_certs: false |
| 263 |
reset_bios: true |
| 264 |
|
| 265 |
- name: Configure boot sources |
| 266 |
dellemc.openmanage.idrac_bios: |
| 267 |
idrac_ip: "192.168.0.1" |
| 268 |
idrac_user: "user_name" |
| 269 |
idrac_password: "user_password" |
| 270 |
ca_path: "/path/to/ca_cert.pem" |
| 271 |
boot_sources: |
| 272 |
- Name: "NIC.Integrated.1-2-3" |
| 273 |
Enabled: true |
| 274 |
Index: 0 |
| 275 |
|
| 276 |
- name: Configure multiple boot sources |
| 277 |
dellemc.openmanage.idrac_bios: |
| 278 |
idrac_ip: "192.168.0.1" |
| 279 |
idrac_user: "user_name" |
| 280 |
idrac_password: "user_password" |
| 281 |
ca_path: "/path/to/ca_cert.pem" |
| 282 |
boot_sources: |
| 283 |
- Name: "NIC.Integrated.1-1-1" |
| 284 |
Enabled: true |
| 285 |
Index: 0 |
| 286 |
- Name: "NIC.Integrated.2-2-2" |
| 287 |
Enabled: true |
| 288 |
Index: 1 |
| 289 |
- Name: "NIC.Integrated.3-3-3" |
| 290 |
Enabled: true |
| 291 |
Index: 2 |
| 292 |
|
| 293 |
- name: Configure boot sources - Enabling |
| 294 |
dellemc.openmanage.idrac_bios: |
| 295 |
idrac_ip: "192.168.0.1" |
| 296 |
idrac_user: "user_name" |
| 297 |
idrac_password: "user_password" |
| 298 |
ca_path: "/path/to/ca_cert.pem" |
| 299 |
boot_sources: |
| 300 |
- Name: "NIC.Integrated.1-1-1" |
| 301 |
Enabled: true |
| 302 |
|
| 303 |
- name: Configure boot sources - Index |
| 304 |
dellemc.openmanage.idrac_bios: |
| 305 |
idrac_ip: "192.168.0.1" |
| 306 |
idrac_user: "user_name" |
| 307 |
idrac_password: "user_password" |
| 308 |
ca_path: "/path/to/ca_cert.pem" |
| 309 |
boot_sources: |
| 310 |
- Name: "NIC.Integrated.1-1-1" |
| 311 |
Index: 0 |
| 312 |
|
| 313 |
|
| 314 |
|
| 315 |
Return Values |
| 316 |
------------- |
| 317 |
|
| 318 |
status_msg (success, str, Successfully cleared pending BIOS attributes.) |
| 319 |
Overall status of the bios operation. |
| 320 |
|
| 321 |
|
| 322 |
msg (success, dict, {'CompletionTime': '2020-04-20T18:50:20', 'Description': 'Job Instance', 'EndTime': None, 'Id': 'JID_873888162305', 'JobState': 'Completed', 'JobType': 'ImportConfiguration', 'Message': 'Successfully imported and applied Server Configuration Profile.', 'MessageArgs': [], 'MessageId': 'SYS053', 'Name': 'Import Configuration', 'PercentComplete': 100, 'StartTime': 'TIME_NOW', 'Status': 'Success', 'TargetSettingsURI': None, 'retval': True}) |
| 323 |
Status of the job for \ :emphasis:`boot\_sources`\ or status of the action performed on bios. |
| 324 |
|
| 325 |
|
| 326 |
invalid_attributes (on invalid attributes or values., dict, {'PxeDev1VlanId': 'Not a valid integer.', 'AcPwrRcvryUserDelay': 'Integer out of valid range.', 'BootSeqRetry': 'Invalid value for Enumeration.', 'Proc1Brand': 'Read only Attribute cannot be modified.', 'AssetTag': 'Attribute does not exist.'}) |
| 327 |
Dict of invalid attributes provided. |
| 328 |
|
| 329 |
|
| 330 |
error_info (on HTTP error, dict, {'error': {'code': 'Base.1.0.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.', '@Message.ExtendedInfo': [{'MessageId': 'GEN1234', 'RelatedProperties': [], 'Message': 'Unable to process the request because an error occurred.', 'MessageArgs': [], 'Severity': 'Critical', 'Resolution': 'Retry the operation. If the issue persists, contact your system administrator.'}]}}) |
| 331 |
Details of the HTTP Error. |
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
Status |
| 338 |
------ |
| 339 |
|
| 340 |
|
| 341 |
|
| 342 |
|
| 343 |
|
| 344 |
Authors |
| 345 |
~~~~~~~ |
| 346 |
|
| 347 |
- Felix Stephen (@felixs88) |
| 348 |
- Anooja Vardhineni (@anooja-vardhineni) |
| 349 |
- Jagadeesh N V (@jagadeeshnv) |
| 350 |
- Shivam Sharma (@shivam-sharma) |
| 351 |
|