dellemc.openmanage.idrac_bios (9.1.0) — module

Modify and clear BIOS attributes, reset BIOS settings and configure boot sources

| "added in version" 2.1.0 of dellemc.openmanage"

Authors: Felix Stephen (@felixs88), Anooja Vardhineni (@anooja-vardhineni), Jagadeesh N V (@jagadeeshnv), Shivam Sharma (@shivam-sharma)

Install collection

Install with ansible-galaxy collection install dellemc.openmanage:==9.1.0


Add to requirements.yml

  collections:
    - name: dellemc.openmanage
      version: 9.1.0

Description

This module allows to modify the BIOS attributes. Also clears pending BIOS attributes and resets BIOS to default settings.

Boot sources can be enabled or disabled. Boot sequence can be configured.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
---
- name: Configure generic attributes of the BIOS
  dellemc.openmanage.idrac_bios:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    attributes:
      BootMode: "Bios"
      OneTimeBootMode: "Enabled"
      BootSeqRetry: "Enabled"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure PXE generic attributes
  dellemc.openmanage.idrac_bios:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    attributes:
      PxeDev1EnDis: "Enabled"
      PxeDev1Protocol: "IPV4"
      PxeDev1VlanEnDis: "Enabled"
      PxeDev1VlanId: 1
      PxeDev1Interface: "NIC.Embedded.1-1-1"
      PxeDev1VlanPriority: 2
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure BIOS attributes at Maintenance window
  dellemc.openmanage.idrac_bios:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Clear pending BIOS attributes
  dellemc.openmanage.idrac_bios:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    clear_pending: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Reset BIOS attributes to default settings.
  dellemc.openmanage.idrac_bios:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    validate_certs: false
    reset_bios: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure boot sources
  dellemc.openmanage.idrac_bios:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    boot_sources:
      - Name: "NIC.Integrated.1-2-3"
        Enabled: true
        Index: 0
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure multiple boot sources
  dellemc.openmanage.idrac_bios:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    boot_sources:
      - Name: "NIC.Integrated.1-1-1"
        Enabled: true
        Index: 0
      - Name: "NIC.Integrated.2-2-2"
        Enabled: true
        Index: 1
      - Name: "NIC.Integrated.3-3-3"
        Enabled: true
        Index: 2
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure boot sources - Enabling
  dellemc.openmanage.idrac_bios:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    boot_sources:
      - Name: "NIC.Integrated.1-1-1"
        Enabled: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure boot sources - Index
  dellemc.openmanage.idrac_bios:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    boot_sources:
      - Name: "NIC.Integrated.1-1-1"
        Index: 0

Inputs

    
ca_path:
    description:
    - The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for
      the validation.
    type: path
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

timeout:
    default: 30
    description: The socket level timeout in seconds.
    type: int
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

idrac_ip:
    description: iDRAC IP Address.
    required: true
    type: str

job_wait:
    default: true
    description:
    - Provides the option to wait for job completion.
    - This is applicable for I(attributes) when I(apply_time) is C(Immediate).
    type: bool

share_mnt:
    description: (deprecated)Local mount path of the network share with read-write permission
      for ansible user. This option is mandatory for network shares.
    type: str

apply_time:
    choices:
    - Immediate
    - OnReset
    - AtMaintenanceWindowStart
    - InMaintenanceWindowOnReset
    default: Immediate
    description:
    - 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 at the start of a maintenance
      window as specified in I(maintenance_window). A reboot job will be scheduled.
    - C(InMaintenanceWindowOnReset) Allows to apply after a manual reset but within the
      maintenance window as specified in I(maintenance_window).
    type: str

attributes:
    description:
    - 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(boot_sources), I(clear_pending), and I(reset_bios).
    type: dict

idrac_port:
    default: 443
    description: iDRAC port.
    type: int

idrac_user:
    description:
    - iDRAC username.
    - If the username is not provided, then the environment variable C(IDRAC_USERNAME)
      is used.
    - 'Example: export IDRAC_USERNAME=username'
    required: true
    type: str

reset_bios:
    description:
    - 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) will not perform any operation.
    - This is mutually exclusive with I(boot_sources), I(attributes), and I(clear_pending).
    - When C(true), this action will always report as changes found to be applicable.
    type: bool

reset_type:
    choices:
    - graceful_restart
    - force_restart
    default: graceful_restart
    description:
    - 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).
    type: str

share_name:
    description: (deprecated)Network share or a local path.
    type: str

share_user:
    description: (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.
    type: str

boot_sources:
    description:
    - (deprecated)List of boot devices to set the boot sources settings.
    - I(boot_sources) is mutually exclusive with I(attributes), I(clear_pending), and
      I(reset_bios).
    - I(job_wait) is not applicable. The module waits till the completion of this task.
    - This feature is deprecated, please use M(dellemc.openmanage.idrac_boot) for configuring
      boot sources.
    elements: raw
    type: list

clear_pending:
    description:
    - Allows the user to clear all pending BIOS attributes changes.
    - C(true) will discard any pending changes to bios attributes or remove job if in
      scheduled state.
    - This operation will not create any job.
    - C(false) will not perform any operation.
    - This is mutually exclusive with I(boot_sources), I(attributes), and I(reset_bios).
    - C(Note) Any BIOS job scheduled due to boot sources configuration will not be cleared.
    type: bool

idrac_password:
    aliases:
    - idrac_pwd
    description:
    - iDRAC user password.
    - If the password is not provided, then the environment variable C(IDRAC_PASSWORD)
      is used.
    - 'Example: export IDRAC_PASSWORD=password'
    required: true
    type: str

share_password:
    aliases:
    - share_pwd
    description: (deprecated)Network share user password. This option is mandatory for
      CIFS share.
    type: str

validate_certs:
    default: true
    description:
    - If C(false), the SSL certificates will not be validated.
    - Configure C(false) only on personally controlled sites where self-signed certificates
      are used.
    - Prior to collection version C(5.0.0), the I(validate_certs) is C(false) by default.
    type: bool
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

job_wait_timeout:
    default: 1200
    description:
    - 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).
    type: int

maintenance_window:
    description:
    - Option to schedule the maintenance window.
    - This is required when I(apply_time) is C(AtMaintenanceWindowStart) or C(InMaintenanceWindowOnReset).
    suboptions:
      duration:
        description:
        - The duration in seconds for the maintenance window.
        required: true
        type: int
      start_time:
        description:
        - The start time for the maintenance window to be scheduled.
        - The format is YYYY-MM-DDThh:mm:ss<offset>
        - '<offset> is the time offset from UTC that the current timezone set in iDRAC
          in the format: +05:30 for IST.'
        required: true
        type: str
    type: dict

Outputs

error_info:
  description: Details of the HTTP Error.
  returned: on HTTP error
  sample:
    error:
      '@Message.ExtendedInfo':
      - Message: Unable to process the request because an error occurred.
        MessageArgs: []
        MessageId: GEN1234
        RelatedProperties: []
        Resolution: Retry the operation. If the issue persists, contact your system
          administrator.
        Severity: Critical
      code: Base.1.0.GeneralError
      message: A general error has occurred. See ExtendedInfo for more information.
  type: dict
invalid_attributes:
  description: Dict of invalid attributes provided.
  returned: on invalid attributes or values.
  sample:
    AcPwrRcvryUserDelay: Integer out of valid range.
    AssetTag: Attribute does not exist.
    BootSeqRetry: Invalid value for Enumeration.
    Proc1Brand: Read only Attribute cannot be modified.
    PxeDev1VlanId: Not a valid integer.
  type: dict
msg:
  description: Status of the job for I(boot_sources) or status of the action performed
    on bios.
  returned: success
  sample:
    CompletionTime: '2020-04-20T18:50:20'
    Description: Job Instance
    EndTime: null
    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: null
    retval: true
  type: dict
status_msg:
  description: Overall status of the bios operation.
  returned: success
  sample: Successfully cleared pending BIOS attributes.
  type: str