# idrac_bios This role allows to modify BIOS attributes, clear pending BIOS attributes, and reset the BIOS to default settings. ## Requirements --- Requirements to develop and contribute to the role. ### Development ```text ansible docker molecule python ``` ### Production Requirements to use the role. ```text ansible python ``` ## Ansible collections Collections required to use the role. ```text dellemc.openmanage ``` ## Role Variables ---
Name Required Default Value Choices Type Description
hostname true str iDRAC IP Address
username true str iDRAC username
password true str iDRAC user password
https_port false 443 int iDRAC port
validate_certs false true bool - If C(false), the SSL certificates will not be validated.
- Configure C(false) only on personally controlled sites where self-signed certificates are used
ca_path false path - The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.
https_timeout false 30 int The socket level timeout in seconds.
attributes false dict - "Dictionary of BIOS attributes and value pair. Attributes should be part of the Redfish Dell BIOS Attribute Registry. Use U(https://I(idrac_ip)/redfish/v1/Systems/System.Embedded.1/Bios) to view the Redfish URI."
- This is mutually exclusive with I(reset_bios).
apply_time false Immediate Immediate, OnReset, AtMaintenanceWindowStart, InMaintenanceWindowOnReset str - Apply time of the I(attributes).
- This is applicable only to I(attributes).
- C(Immediate) Allows the user to immediately reboot the host and apply the changes. I(job_wait) is applicable.
- C(OnReset) Allows the user to apply the changes on the next reboot of the host server.
- C(AtMaintenanceWindowStart) Allows the user to apply the changes at the start of a maintenance window as specifiedin I(maintenance_window). A reboot job will be scheduled.
- C(InMaintenanceWindowOnReset) Allows to apply the changes after a manual reset but within the maintenance window as specified in I(maintenance_window).
maintenance_window false dict - Option to schedule the maintenance window.
- This is required when I(apply_time) is C(AtMaintenanceWindowStart) or C(InMaintenanceWindowOnReset).
     start_time true str - The start time for the maintenance window to be scheduled.
- The format is YYYY-MM-DDThh:mm:ss, is the time offset from UTC that the current time zone set in iDRAC in the format: +05:30 for IST.
     duration true int - The duration in seconds for the maintenance window.
clear_pending false bool - Allows the user to clear all pending BIOS attributes changes.
- C(true) discards any pending changes to BIOS attributes or removes the job if in scheduled state.
- This operation will not create any job.
- C(false) does not perform any operation.
- This is mutually exclusive with I(reset_bios).
- C(Note) Any BIOS job scheduled will not be cleared because of boot sources configuration.
reset_bios false bool - Resets the BIOS to default settings and triggers a reboot of host system.
- This is applied to the host after the restart.
- This operation will not create any job.
- C(false) does not perform any operation.
- This is mutually exclusive with I(attributes), and I(clear_pending).
- When C(true), this action will always report as changes found to be applicable.
reset_type false graceful_restart graceful_restart
force_restart
str - C(force_restart) Forcefully reboot the host system.
- C(graceful_restart) Gracefully reboot the host system.
- This is applicable for I(reset_bios), and I(attributes) when I(apply_time) is C(Immediate).
job_wait false true bool - Provides the option to wait for job completion.
- This is applicable for I(attributes) when I(apply_time) is C(Immediate).
job_wait_timeout false 1200 int - The maximum wait time of I(job_wait) in seconds.
The job is tracked only for this duration.
- This option is applicable when I(job_wait) is C(True).
## Fact variables
Name Sample Description
idrac_bios_out { "attributes": { "ansible_facts": {}, "changed": true, "failed": false, "job_id": "JID_XXXXXXXXXXXX", "msg": { "ActualRunningStartTime": "2023-05-19T04:55:01", "ActualRunningStopTime": "2023-05-19T04:59:21", "CompletionTime": "2023-05-19T04:59:21", "Description": "Job Instance", "EndTime": "TIME_NA", "Id": "JID_844899049402", "JobState": "Completed", "JobType": "BIOSConfiguration", "Message": "Job completed successfully.", "MessageArgs": [], "MessageId": "PR19", "Name": "Configure: BIOS.Setup.1-1", "PercentComplete": 100, "StartTime": "2023-05-19T04:51:44", "TargetSettingsURI": null }, "status_msg": "Successfully applied the BIOS attributes update." }, "clear_pending": { "changed": false, "skip_reason": "Conditional result was False", "skipped": true }, "reset_bios": { "changed": false, "skip_reason": "Conditional result was False", "skipped": true } } Module output of the idrac_bios job.
## Examples --- ```yaml - name: Configure generic attributes of the BIOS ansible.builtin.import_role: name: idrac_bios vars: hostname: "192.168.0.1" username: "user_name" password: "user_password" ca_path: "/path/to/ca_cert.pem" attributes: BootMode : "Bios" OneTimeBootMode: "Enabled" BootSeqRetry: "Enabled" ``` ```yaml - name: Configure BIOS attributes at Maintenance window. ansible.builtin.import_role: name: idrac_bios vars: hostname: "192.168.0.1" username: "user_name" password: "user_password" ca_path: "/path/to/ca_cert.pem" apply_time: AtMaintenanceWindowStart maintenance_window: start_time: "2022-09-30T05:15:40-05:00" duration: 600 attributes: BootMode : "Bios" OneTimeBootMode: "Enabled" BootSeqRetry: "Enabled" ``` ```yaml - name: Clear pending BIOS attributes. ansible.builtin.import_role: name: idrac_bios vars: hostname: "192.168.0.1" username: "user_name" password: "user_password" ca_path: "/path/to/ca_cert.pem" clear_pending: true ``` ```yaml - name: Reset BIOS attributes to default settings. ansible.builtin.import_role: name: idrac_bios vars: hostname: "192.168.0.1" username: "user_name" password: "user_password" ca_path: "/path/to/ca_cert.pem" reset_bios: true ``` ## Author Information --- Dell Technologies
Abhishek Sinha (Abhishek.Sinha10@Dell.com) 2023