dellemc.openmanage.idrac_license module – Configure iDRAC licenses

Note

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

New in dellemc.openmanage 8.7.0

Synopsis

  • This module allows to import, export and delete licenses on iDRAC.

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.

delete

boolean

Delete the license from the iDRAC.

When delete is true, then license_id is required.

delete is mutually exclusive with export and import.

Choices:

  • false ← (default)

  • true

export

boolean

Export the license from the iDRAC.

When export is true, license_id and share_parameters is required.

export is mutually exclusive with delete and import.

Choices:

  • false ← (default)

  • true

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

import

boolean

Import the license from the iDRAC.

When import is true, share_parameters is required.

import is mutually exclusive with delete and export.

Choices:

  • false ← (default)

  • true

license_id

aliases: entitlement_id

string

Entitlement ID of the license that is to be imported, exported or deleted.

license_id is required when delete is true or export is true.

resource_id

string

Id of the resource.

If the value for resource ID is not provided, the module picks the first resource ID available from the list of system resources returned by the iDRAC.

share_parameters

dictionary

Parameters that are required for the import and export operation of a license.

share_parameters is required when export or import is true.

file_name

string

License file name for import and export operation.

file_name is required when import is true.

For the import operation, when share_type is local, the supported extensions for file_name are ‘.txt’ and ‘.xml’. For other share types, the supported extension is ‘.xml’

ignore_certificate_warning

string

Ignores the certificate warning while connecting to Share and is only applicable when share_type is https.

on ignores the certificate warning.

off does not ignore the certificate warning.

Choices:

  • "off" ← (default)

  • "on"

ip_address

string

IP address of the network share.

ip_address is required when share_type is nfs, cifs, http or https.

password

string

Password of the network share.

password is required when share_type is cifs.

proxy_password

string

The password of the proxy server.

proxy_password is only applicable when share_type is https or https and when proxy_support is parameters_proxy.

proxy_port

integer

The port of the proxy server.

proxy_port is only applicable when share_type is https or https and when proxy_support is parameters_proxy.

Default: 80

proxy_server

string

The IP address of the proxy server.

proxy_server is required when proxy_support is parameters_proxy.

proxy_server is only applicable when share_type is https or https and when proxy_support is parameters_proxy.

proxy_support

string

Specifies if proxy is to be used or not.

off does not use proxy settings.

default_proxy uses the default proxy settings.

parameters_proxy uses the specified proxy settings. proxy_server is required when proxy_support is parameters_proxy.

proxy_support is only applicable when share_type is https or https.

Choices:

  • "off" ← (default)

  • "default_proxy"

  • "parameters_proxy"

proxy_type

string

The proxy type of the proxy server.

http to select HTTP proxy.

socks to select SOCKS proxy.

proxy_type is only applicable when share_type is https or https and when proxy_support is parameters_proxy.

Choices:

  • "http" ← (default)

  • "socks"

proxy_username

string

The username of the proxy server.

proxy_username is only applicable when share_type is https or https and when proxy_support is parameters_proxy.

share_name

string

Network share or local path of the license file.

share_type

string

Share type of the network share.

local uses local path for import and export operation.

nfs uses NFS share for import and export operation.

cifs uses CIFS share for import and export operation.

http uses HTTP share for import and export operation.

https uses HTTPS share for import and export operation.

Choices:

  • "local" ← (default)

  • "nfs"

  • "cifs"

  • "http"

  • "https"

username

string

Username of the network share.

username is required when share_type is cifs.

workgroup

string

Workgroup of the network share.

workgroup is applicable only when share_type is cifs.

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

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.

  • This module does not support check_mode.

  • When share_type is local for import and export operations, job_details are not displayed.

Examples

---
- name: Export a license from iDRAC to local
  dellemc.openmanage.idrac_license:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    license_id: "LICENSE_123"
    export: true
    share_parameters:
      share_type: "local"
      share_name: "/path/to/share"
      file_name: "license_file"

- name: Export a license from iDRAC to NFS share
  dellemc.openmanage.idrac_license:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    license_id: "LICENSE_123"
    export: true
    share_parameters:
      share_type: "nfs"
      share_name: "/path/to/share"
      file_name: "license_file"
      ip_address: "192.168.0.1"

- name: Export a license from iDRAC to CIFS share
  dellemc.openmanage.idrac_license:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    license_id: "LICENSE_123"
    export: true
    share_parameters:
      share_type: "cifs"
      share_name: "/path/to/share"
      file_name: "license_file"
      ip_address: "192.168.0.1"
      username: "username"
      password: "password"
      workgroup: "workgroup"

- name: Export a license from iDRAC to HTTP share via proxy
  dellemc.openmanage.idrac_license:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    license_id: "LICENSE_123"
    export: true
    share_parameters:
      share_type: "http"
      share_name: "/path/to/share"
      file_name: "license_file"
      ip_address: "192.168.0.1"
      username: "username"
      password: "password"
      proxy_support: "parameters_proxy"
      proxy_type: socks
      proxy_server: "192.168.0.2"
      proxy_port: 1080
      proxy_username: "proxy_username"
      proxy_password: "proxy_password"

- name: Export a license from iDRAC to HTTPS share
  dellemc.openmanage.idrac_license:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    license_id: "LICENSE_123"
    export: true
    share_parameters:
      share_type: "https"
      share_name: "/path/to/share"
      file_name: "license_file"
      ip_address: "192.168.0.1"
      username: "username"
      password: "password"
      ignore_certificate_warning: "on"

- name: Import a license to iDRAC from local
  dellemc.openmanage.idrac_license:
    idrac_ip: 198.162.0.1
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    import: true
    share_parameters:
      file_name: "license_file_name.xml"
      share_type: local
      share_name: "/path/to/share"

- name: Import a license to iDRAC from NFS share
  dellemc.openmanage.idrac_license:
    idrac_ip: 198.162.0.1
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    import: true
    share_parameters:
      file_name: "license_file_name.xml"
      share_type: nfs
      ip_address: "192.168.0.1"
      share_name: "/path/to/share"

- name: Import a license to iDRAC from CIFS share
  dellemc.openmanage.idrac_license:
    idrac_ip: 198.162.0.1
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    import: true
    share_parameters:
      file_name: "license_file_name.xml"
      share_type: cifs
      ip_address: "192.168.0.1"
      share_name: "/path/to/share"
      username: "username"
      password: "password"

- name: Import a license to iDRAC from HTTP share
  dellemc.openmanage.idrac_license:
    idrac_ip: 198.162.0.1
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    import: true
    share_parameters:
      file_name: "license_file_name.xml"
      share_type: http
      ip_address: "192.168.0.1"
      share_name: "/path/to/share"
      username: "username"
      password: "password"

- name: Import a license to iDRAC from HTTPS share via proxy
  dellemc.openmanage.idrac_license:
    idrac_ip: 198.162.0.1
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    import: true
    share_parameters:
      file_name: "license_file_name.xml"
      share_type: https
      ip_address: "192.168.0.1"
      share_name: "/path/to/share"
      username: "username"
      password: "password"
      proxy_support: "parameters_proxy"
      proxy_server: "192.168.0.2"
      proxy_port: 808
      proxy_username: "proxy_username"
      proxy_password: "proxy_password"

- name: Delete a License from iDRAC
  dellemc.openmanage.idrac_license:
    idrac_ip: 198.162.0.1
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    license_id: "LICENCE_123"
    delete: true

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": "The authentication credentials included with this request are missing or invalid.", "MessageArgs": [], "MessageId": "Base.1.8.AccessDenied", "RelatedProperties": [], "Resolution": "Attempt to ensure that the URI is correct and that the service has the appropriate credentials.", "Severity": "Critical"}], "code": "Base.1.8.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 import and export operations

Sample: {"ActualRunningStartTime": "2024-01-09T05:16:19", "ActualRunningStopTime": "2024-01-09T05:16:19", "CompletionTime": "2024-01-09T05:16:19", "Description": "Job Instance", "EndTime": null, "Id": "JID_XXXXXXXXX", "JobState": "Completed", "JobType": "LicenseExport", "Message": "The command was successful.", "MessageArgs": [], "MessageId": "LIC900", "Name": "Export: License", "PercentComplete": 100, "StartTime": "2024-01-09T05:16:19", "TargetSettingsURI": null}

msg

string

Status of the license operation.

Returned: always

Sample: "Successfully exported the license."

Authors

  • Rajshekar P(@rajshekarp87)