dellemc.openmanage.omevv_firmware module – Update the firmware of a specific host in the cluster

Note

This module is part of the dellemc.openmanage collection (version 9.10.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.omevv_firmware.

New in dellemc.openmanage 9.10.0

Synopsis

  • This module allows you to update the firmware of a specific host in the cluster.

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.9.6

Parameters

Parameter

Comments

ca_path

path

The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.

check_vSAN_health

boolean

Check vSAN health while updating the firmware.

true checks the vSAN health while updating the firmware.

false does not check the vSAN health while updating the firmware.

Choices:

  • false

  • true

date_time

string

Date and time when the job must run. This is applicable when run_now is false.

The supported format is YYYY-MM-DDThh:mm:ss<offset>.

delete_job_queue

boolean

Whether to delete the job queue in iDRAC while updating firmware.

true deletes the job queue in iDRAC while updating firmware.

false does not delete the job queue in iDRAC while updating firmware.

Choices:

  • false

  • true

drs_check

boolean

Allows you to check if DRS of the cluster is enabled or not.

true checks if Distributed Resource Scheduler (DRS) of the cluster is enabled.

false does not check if DRS of the cluster is enabled.

Choices:

  • false ← (default)

  • true

enter_maintenance_mode_options

string

VM migration policy during management mode.

FULL_DATA_MIGRATION for full data migration.

ENSURE_ACCESSIBILITY for ensuring accessibility.

NO_DATA_MIGRATION does not migrate any data.

Choices:

  • "FULL_DATA_MIGRATION"

  • "ENSURE_ACCESSIBILITY"

  • "NO_DATA_MIGRATION"

enter_maintenance_mode_timeout

integer

Time out value during maintenance mode in minutes.

Default: 60

evacuate_VMs

boolean

Allows to move the virtual machine (VM) to other host when current host is powered off.

true moves the VM to another host when the current host is powered off.

false does not move the VM to another host when the current host is powered off.

Choices:

  • false ← (default)

  • true

exit_maintenance_mode

boolean

Whether to exit management mode after Update.

true exits the management mode after Update.

false does not exit the management mode after Update.

Choices:

  • false ← (default)

  • true

hostname

string / required

IP address or hostname of the OpenManage Enterprise Modular.

job_description

string

Update job description.

job_name

string

Update job name.

job_wait

boolean

Whether to wait till completion of the job. This is applicable when power_on is true.

true waits for job completion.

false does not 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.

Default: 1200

maintenance_mode_count_check

boolean

Allows to check if any host in cluster is in management mode.

true checks if any host in cluster is in management mode.

false does not check if any host in cluster is in management mode.

Choices:

  • false

  • true

port

integer

OpenManage Enterprise HTTPS port.

Default: 443

reboot_options

string

Host reboot option for firmware update.

FORCEREBOOT will force reboot the server.

SAFEREBOOT reboots the server in safe mode.

NEXTREBOOT does not reboot the server.

Choices:

  • "FORCEREBOOT"

  • "SAFEREBOOT" ← (default)

  • "NEXTREBOOT"

reset_idrac

boolean

Whether to reset the iDRAC while performing firmware update.

true resets the iDRAC while performing firmware update.

false does not reset the iDRAC while performing firmware update.

Choices:

  • false

  • true

run_now

boolean / required

Whether to run the update job now or later.

true runs the update job instantly.

false runs the update at the specified date_time.

Choices:

  • false

  • true

targets

list / elements=dictionary / required

The target details for the firmware update operation.

Either cluster, servicetag or host is required for the firmware update operation.

cluster

string

Name of the cluster to which firmware needs to updated.

cluster is mutually exclusive with servicetag and host.

This module supports only single cluster update.

firmware_components

list / elements=string / required

List of host firmware components to update.

dellemc.openmanage.omevv_firmware_compliance_info module can be used to fetch the supported firmware components.

host

string

The IP address or hostname of the host.

host is mutually exclusive with servicetag and cluster.

dellemc.openmanage.omevv_device_info module can be used to fetch the device information.

servicetag

string

The service tag of the host.

servicetag is mutually exclusive with host and cluster.

dellemc.openmanage.omevv_device_info module can be used to fetch the device information.

timeout

integer

The socket level timeout in seconds.

Default: 30

validate_certs

boolean

Whether to check SSL certificate. - If true, the SSL certificates will be validated. - If false, the SSL certificates will not be validated.

Choices:

  • false

  • true ← (default)

vcenter_password

string

Password for OpenManage Enterprise Integration for VMware vCenter (OMEVV).

If the password is not provided, then the environment variable OMEVV_VCENTER_PASSWORD is used.

Example: export OMEVV_VCENTER_PASSWORD=password

vcenter_username

string

Username for OpenManage Enterprise Integration for VMware vCenter (OMEVV).

If the username is not provided, then the environment variable OMEVV_VCENTER_USERNAME is used.

Example: export OMEVV_VCENTER_USERNAME=username

vcenter_uuid

string

Universally Unique Identifier (UUID) of vCenter.

vCenter UUID details can be retrieved using dellemc.openmanage.omevv_vcenter_info module.

If UUID is not provided, then the environment variable OMEVV_VCENTER_UUID is used.

Example: export OMEVV_VCENTER_UUID=uuid

Attributes

Attribute

Support

Description

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying target, if not supported the action will be skipped.

diff_mode

Support: full

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode.

Notes

Note

  • Run this module from a system that has direct access to Dell OpenManage Enterprise.

  • This module supports IPv4 and IPv6 addresses.

Examples

---
- name: Immediately update the firmware of a single component for a specific host
  dellemc.openmanage.omevv.omevv_firmware:
    hostname: "XXX.XXX.XXX.XX"
    vcenter_uuid: "xxxxx"
    vcenter_username: "username"
    vcenter_password: "password"
    ca_path: "path/to/ca_file"
    run_now: false
    date_time: "2024-09-10T20:50:00Z"
    enter_maintenance_mode_timeout: 60
    enter_maintenance_mode_options: FULL_DATA_MIGRATION
    drs_check: true
    evacuate_VMs: true
    exit_maintenance_mode: true
    reboot_options: NEXTREBOOT
    maintenance_mode_count_check: true
    check_vSAN_health: true
    reset_idrac: true
    delete_job_queue: true
    targets:
      - servicetag: SVCTAG1
        firmware_components:
          - "DCIM:INSTALLED#802__Diagnostics.Embedded.1:LC.Embedded.1"

- name: Update the firmware of multiple components at scheduled time for a specific host
  dellemc.openmanage.omevv.omevv_firmware:
    hostname: "XXX.XXX.XXX.XY"
    vcenter_uuid: "xxxxx"
    vcenter_username: "username"
    vcenter_password: "password"
    ca_path: "path/to/ca_file"
    run_now: false
    date_time: "2024-09-10T20:50:00+05:30"
    enter_maintenance_mode_timeout: 60
    enter_maintenance_mode_options: ENSURE_ACCESSIBILITY
    drs_check: true
    evacuate_VMs: true
    exit_maintenance_mode: true
    reboot_options: FORCEREBOOT
    maintenance_mode_count_check: true
    check_vSAN_health: true
    reset_idrac: false
    delete_job_queue: false
    targets:
      - host: "XXX.XXX.XXX.XZ"
        firmware_components:
          - "DCIM:INSTALLED#iDRAC.Embedded.1-1#IDRACinfo"
          - "DCIM:INSTALLED#301_C_BOSS.SL.14-1"
          - "DCIM:INSTALLED#807__TPM.Integrated.1-1"

- name: Update the firmware of multiple components at scheduled time for a cluster
  dellemc.openmanage.omevv.omevv_firmware:
    hostname: "XXX.XXX.XXX.XX"
    vcenter_uuid: "xxxxx"
    vcenter_username: "username"
    vcenter_password: "password"
    ca_path: "path/to/ca_file"
    run_now: false
    date_time: "2024-09-10T20:50:00+05:30"
    enter_maintenance_mode_timeout: 60
    enter_maintenance_mode_options: ENSURE_ACCESSIBILITY
    drs_check: true
    evacuate_VMs: true
    exit_maintenance_mode: true
    reboot_options: SAFEREBOOT
    maintenance_mode_count_check: true
    check_vSAN_health: true
    reset_idrac: false
    delete_job_queue: false
    targets:
      - cluster: cluster_a
        firmware_components:
          - "DCIM:INSTALLED#iDRAC.Embedded.1-1#IDRACinfo"
          - "DCIM:INSTALLED#301_C_BOSS.SL.14-1"
          - "DCIM:INSTALLED#807__TPM.Integrated.1-1"

- name: Retrieve firmware compliance report of all hosts in the specific cluster
  dellemc.openmanage.omevv_firmware_compliance_info:
    hostname: "XXX.XXX.XXX.XX"
    vcenter_uuid: "xxxxx"
    vcenter_username: "username"
    vcenter_password: "password"
    ca_path: "path/to/ca_file"
    clusters:
      - cluster_name: cluster_a
  register: compliance_data

- name: Initialize compliance status results
  ansible.builtin.set_fact:
    source_names: []
    service_tag: ""

- name: Flatten host compliance reports
  ansible.builtin.set_fact:
    host_reports: "{{
        compliance_data.firmware_compliance_info |
        map(attribute='hostComplianceReports') |
        flatten(levels=1) }}"

- name: Flatten and filter concompliant components
  ansible.builtin.set_fact:
    non_compliant_components: >-
        {{
          host_reports
          | map(attribute='componentCompliances')
          | flatten(levels=1)
          | selectattr('driftStatus', 'equalto', 'NonCompliant')
        }}

- name: Gather components source name and set service tag
  ansible.builtin.set_fact:
    source_names: "{{ source_names + [item.sourceName] }}"
    service_tag: "{{ host_report.serviceTag }}"
  loop: "{{ non_compliant_components }}"
  vars:
    host_report: >-
        {{
          host_reports
          | selectattr('componentCompliances', 'contains', item)
          | first
        }}

- name: Combine the final non compliance report
  ansible.builtin.set_fact:
    noncompliance_report:
      sourceNames: "{{ source_names }}"
      serviceTag: "{{ service_tag }}"

- name: Update firmware at the scheduled time for a specific host
  dellemc.openmanage.omevv.omevv_firmware:
    hostname: "192.168.0.1"
    vcenter_uuid: "{{ vcenter_uuid }}"
    vcenter_username: "username"
    vcenter_password: "password"
    ca_path: "path/to/ca_file"
    run_now: false
    date_time: "2024-09-10T20:50:00Z"
    enter_maintenance_mode_timeout: 60
    enter_maintenance_mode_options: NO_DATA_MIGRATION
    drs_check: true
    evacuate_VMs: false
    exit_maintenance_mode: true
    reboot_options: SAFEREBOOT
    maintenance_mode_count_check: true
    check_vSAN_health: true
    reset_idrac: true
    delete_job_queue: true
    targets:
      - servicetag: "{{ noncompliance_report.serviceTag }}"
        firmware_components: "{{ noncompliance_report.sourceNames }}"

Return Values

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

Key

Description

error_info

dictionary

Details of the module HTTP Error.

Returned: on HTTP error

Sample: {"errorCode": "20058", "message": "Update Job already running for group id 1004 corresponding to cluster OMAM-Cluster-1. Wait for its completion and trigger."}

msg

string

Status of the firmware update operation.

Returned: always

Sample: "Successfully created the OMEVV baseline profile."

Authors

  • Rajshekar P(@rajshekarp87)