dellemc.openmanage.idrac_system_erase module – Erase system and storage components of the server

Note

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

New in dellemc.openmanage 9.7.0

Synopsis

  • This module allows you to erase system components such as iDRAC, BIOS, DIAG, and so forth. You can also erase storage components such as PERC NV cache, non-volatile memory, cryptographic erase of physical disks, and so on of the server

Requirements

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

  • python >= 3.9.6

Parameters

Parameter

Comments

ca_path

path

added in dellemc.openmanage 5.0.0

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

component

list / elements=string / required

List of system and storage components that can be deleted.

The following are the supported components. AllApps BIOS CryptographicErasePD DIAG DPU DrvPack IDRAC LCData NonVolatileMemory OverwritePD PERCNVCache ReinstallFW vFlash

idrac_ip

string / required

iDRAC IP Address.

idrac_password

aliases: idrac_pwd

string

iDRAC user password.

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

Example: export IDRAC_PASSWORD=password

idrac_port

integer

iDRAC port.

Default: 443

idrac_user

string

iDRAC username.

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

Example: export IDRAC_USERNAME=username

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

power_on

boolean

This parameter allows you to power on the server after the erase operation is completed. This is applicable when job_wait is true.

true power on the server.

false does not power on the server.

Choices:

  • false ← (default)

  • true

resource_id

string

Manager ID of the iDRAC.

timeout

integer

added in dellemc.openmanage 5.0.0

The socket level timeout in seconds.

Default: 30

validate_certs

boolean

added in dellemc.openmanage 5.0.0

If false, the SSL certificates will not be validated.

Configure false only on personally controlled sites where self-signed certificates are used.

Prior to collection version 5.0.0, the validate_certs is false by default.

Choices:

  • false

  • true ← (default)

x_auth_token

string

added in dellemc.openmanage 9.3.0

Authentication token.

If the x_auth_token is not provided, then the environment variable IDRAC_X_AUTH_TOKEN is used.

Example: export IDRAC_X_AUTH_TOKEN=x_auth_token

Attributes

Attribute

Support

Description

check_mode

Support: full

Runs task to validate without performing action on the target machine.

diff_mode

Support: none

Runs the task to report the changes made or to be made.

Notes

Note

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

  • This module supports only iDRAC9 and above.

  • This module supports IPv4 and IPv6 addresses.

Examples

---
- name: Erase a single component and power on the server
  dellemc.openmanage.idrac_system_erase:
    idrac_ip: 198.162.0.1
    idrac_user: username
    idrac_password: passw0rd
    ca_path: "/path/to/ca_cert.pem"
    component: ["BIOS"]
    power_on: true

- name: Erase multiple components and do not power on the server after the erase operation is completed
  dellemc.openmanage.idrac_system_erase:
    idrac_ip: 198.162.0.1
    idrac_user: username
    idrac_password: passw0rd
    ca_path: "/path/to/ca_cert.pem"
    component: ["BIOS", "DIAG", "PERCNVCache"]

- name: Erase multiple components and do not wait for the job completion
  dellemc.openmanage.idrac_system_erase:
    idrac_ip: 198.162.0.1
    idrac_user: username
    idrac_password: passw0rd
    ca_path: "/path/to/ca_cert.pem"
    component: ["IDRAC", "DPU", "LCData"]
    job_wait: false

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 HTTP Error.

Returned: On HTTP error

Sample: {"error": {"@Message.ExtendedInfo": [{"Message": "Unable to complete the operation because the value NonVolatileMemor entered for the property Component is not in the list of acceptable values.", "MessageArgs": ["NonVolatileMemor", "Component"], "MessageArgs@odata.count": 2, "MessageId": "IDRAC.2.9.SYS426", "RelatedProperties": [], "RelatedProperties@odata.count": 0, "Resolution": "Enter a valid value from the enumeration list that Redfish service supports and retry the operation.For information about valid values, see the iDRAC User's Guide available on the support site.", "Severity": "Warning"}, {"Message": "The value 'NonVolatileMemor' for the property Component is not in the list of acceptable values.", "MessageArgs": ["NonVolatileMemor", "Component"], "MessageArgs@odata.count": 2, "MessageId": "Base.1.12.PropertyValueNotInList", "RelatedProperties": [], "RelatedProperties@odata.count": 0, "Resolution": "Choose a value from the enumeration list that the implementation can support and resubmit the request if the operation failed.", "Severity": "Warning"}], "code": "Base.1.12.GeneralError", "message": "A general error has occurred. See ExtendedInfo for more information"}}

job_details

dictionary

Returns the output for status of the job.

Returned: For system erase operation

Sample: {"ActualRunningStartTime": null, "ActualRunningStopTime": null, "CompletionTime": "2024-08-06T19:55:01", "Description": "Job Instance", "EndTime": "TIME_NA", "Id": "JID_229917427823", "JobState": "Completed", "JobType": "SystemErase", "Message": "Job completed successfully.", "MessageArgs": [], "MessageArgs@odata.count": 0, "MessageId": "SYS018", "Name": "System_Erase", "PercentComplete": 100, "StartTime": "2024-08-06T19:49:02", "TargetSettingsURI": null}

msg

string

Status of the component system erase operation.

Returned: always

Sample: "Successfully completed the system erase operation."

Authors

  • Rajshekar P(@rajshekarp87)