| 1 |
.. _idrac_license_module: |
| 2 |
|
| 3 |
|
| 4 |
idrac_license -- Configure iDRAC licenses |
| 5 |
========================================= |
| 6 |
|
| 7 |
.. contents:: |
| 8 |
:local: |
| 9 |
:depth: 1 |
| 10 |
|
| 11 |
|
| 12 |
Synopsis |
| 13 |
-------- |
| 14 |
|
| 15 |
This module allows to import, export and delete licenses on iDRAC. |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
Requirements |
| 20 |
------------ |
| 21 |
The below requirements are needed on the host that executes this module. |
| 22 |
|
| 23 |
- python \>= 3.9.6 |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
Parameters |
| 28 |
---------- |
| 29 |
|
| 30 |
license_id (optional, str, None) |
| 31 |
Entitlement ID of the license that is to be imported, exported or deleted. |
| 32 |
|
| 33 |
:emphasis:`license\_id` is required when :emphasis:`delete` is :literal:`true` or :emphasis:`export` is :literal:`true`. |
| 34 |
|
| 35 |
|
| 36 |
delete (optional, bool, False) |
| 37 |
Delete the license from the iDRAC. |
| 38 |
|
| 39 |
When :emphasis:`delete` is :literal:`true`\ , then :emphasis:`license\_id` is required. |
| 40 |
|
| 41 |
:emphasis:`delete` is mutually exclusive with :emphasis:`export` and :emphasis:`import`. |
| 42 |
|
| 43 |
|
| 44 |
export (optional, bool, False) |
| 45 |
Export the license from the iDRAC. |
| 46 |
|
| 47 |
When :emphasis:`export` is :literal:`true`\ , :emphasis:`license\_id` and :emphasis:`share\_parameters` is required. |
| 48 |
|
| 49 |
:emphasis:`export` is mutually exclusive with :emphasis:`delete` and :emphasis:`import`. |
| 50 |
|
| 51 |
|
| 52 |
import (optional, bool, False) |
| 53 |
Import the license from the iDRAC. |
| 54 |
|
| 55 |
When :emphasis:`import` is :literal:`true`\ , :emphasis:`share\_parameters` is required. |
| 56 |
|
| 57 |
:emphasis:`import` is mutually exclusive with :emphasis:`delete` and :emphasis:`export`. |
| 58 |
|
| 59 |
|
| 60 |
share_parameters (optional, dict, None) |
| 61 |
Parameters that are required for the import and export operation of a license. |
| 62 |
|
| 63 |
:emphasis:`share\_parameters` is required when :emphasis:`export` or :emphasis:`import` is :literal:`true`. |
| 64 |
|
| 65 |
|
| 66 |
share_type (optional, str, local) |
| 67 |
Share type of the network share. |
| 68 |
|
| 69 |
:literal:`local` uses local path for :emphasis:`import` and :emphasis:`export` operation. |
| 70 |
|
| 71 |
:literal:`nfs` uses NFS share for :emphasis:`import` and :emphasis:`export` operation. |
| 72 |
|
| 73 |
:literal:`cifs` uses CIFS share for :emphasis:`import` and :emphasis:`export` operation. |
| 74 |
|
| 75 |
:literal:`http` uses HTTP share for :emphasis:`import` and :emphasis:`export` operation. |
| 76 |
|
| 77 |
:literal:`https` uses HTTPS share for :emphasis:`import` and :emphasis:`export` operation. |
| 78 |
|
| 79 |
|
| 80 |
file_name (optional, str, None) |
| 81 |
License file name for :emphasis:`import` and :emphasis:`export` operation. |
| 82 |
|
| 83 |
:emphasis:`file\_name` is required when :emphasis:`import` is :literal:`true`. |
| 84 |
|
| 85 |
For the :emphasis:`import` operation, when :emphasis:`share\_type` is :literal:`local`\ , the supported extensions for :emphasis:`file\_name` are '.txt' and '.xml'. For other share types, the supported extension is '.xml' |
| 86 |
|
| 87 |
|
| 88 |
ip_address (optional, str, None) |
| 89 |
IP address of the network share. |
| 90 |
|
| 91 |
:emphasis:`ip\_address` is required when :emphasis:`share\_type` is :literal:`nfs`\ , :literal:`cifs`\ , :literal:`http` or :literal:`https`. |
| 92 |
|
| 93 |
|
| 94 |
share_name (optional, str, None) |
| 95 |
Network share or local path of the license file. |
| 96 |
|
| 97 |
|
| 98 |
workgroup (optional, str, None) |
| 99 |
Workgroup of the network share. |
| 100 |
|
| 101 |
:emphasis:`workgroup` is applicable only when :emphasis:`share\_type` is :literal:`cifs`. |
| 102 |
|
| 103 |
|
| 104 |
username (optional, str, None) |
| 105 |
Username of the network share. |
| 106 |
|
| 107 |
:emphasis:`username` is required when :emphasis:`share\_type` is :literal:`cifs`. |
| 108 |
|
| 109 |
|
| 110 |
password (optional, str, None) |
| 111 |
Password of the network share. |
| 112 |
|
| 113 |
:emphasis:`password` is required when :emphasis:`share\_type` is :literal:`cifs`. |
| 114 |
|
| 115 |
|
| 116 |
ignore_certificate_warning (optional, str, off) |
| 117 |
Ignores the certificate warning while connecting to Share and is only applicable when :emphasis:`share\_type` is :literal:`https`. |
| 118 |
|
| 119 |
:literal:`on` ignores the certificate warning. |
| 120 |
|
| 121 |
:literal:`off` does not ignore the certificate warning. |
| 122 |
|
| 123 |
|
| 124 |
proxy_support (optional, str, off) |
| 125 |
Specifies if proxy is to be used or not. |
| 126 |
|
| 127 |
:literal:`off` does not use proxy settings. |
| 128 |
|
| 129 |
:literal:`default\_proxy` uses the default proxy settings. |
| 130 |
|
| 131 |
:literal:`parameters\_proxy` uses the specified proxy settings. :emphasis:`proxy\_server` is required when :emphasis:`proxy\_support` is :literal:`parameters\_proxy`. |
| 132 |
|
| 133 |
:emphasis:`proxy\_support` is only applicable when :emphasis:`share\_type` is :literal:`https` or :literal:`https`. |
| 134 |
|
| 135 |
|
| 136 |
proxy_type (optional, str, http) |
| 137 |
The proxy type of the proxy server. |
| 138 |
|
| 139 |
:literal:`http` to select HTTP proxy. |
| 140 |
|
| 141 |
:literal:`socks` to select SOCKS proxy. |
| 142 |
|
| 143 |
:emphasis:`proxy\_type` is only applicable when :emphasis:`share\_type` is :literal:`https` or :literal:`https` and when :emphasis:`proxy\_support` is :literal:`parameters\_proxy`. |
| 144 |
|
| 145 |
|
| 146 |
proxy_server (optional, str, None) |
| 147 |
The IP address of the proxy server. |
| 148 |
|
| 149 |
:emphasis:`proxy\_server` is required when :emphasis:`proxy\_support` is :literal:`parameters\_proxy`. |
| 150 |
|
| 151 |
:emphasis:`proxy\_server` is only applicable when :emphasis:`share\_type` is :literal:`https` or :literal:`https` and when :emphasis:`proxy\_support` is :literal:`parameters\_proxy`. |
| 152 |
|
| 153 |
|
| 154 |
proxy_port (optional, int, 80) |
| 155 |
The port of the proxy server. |
| 156 |
|
| 157 |
:emphasis:`proxy\_port` is only applicable when :emphasis:`share\_type` is :literal:`https` or :literal:`https` and when :emphasis:`proxy\_support` is :literal:`parameters\_proxy`. |
| 158 |
|
| 159 |
|
| 160 |
proxy_username (optional, str, None) |
| 161 |
The username of the proxy server. |
| 162 |
|
| 163 |
:emphasis:`proxy\_username` is only applicable when :emphasis:`share\_type` is :literal:`https` or :literal:`https` and when :emphasis:`proxy\_support` is :literal:`parameters\_proxy`. |
| 164 |
|
| 165 |
|
| 166 |
proxy_password (optional, str, None) |
| 167 |
The password of the proxy server. |
| 168 |
|
| 169 |
:emphasis:`proxy\_password` is only applicable when :emphasis:`share\_type` is :literal:`https` or :literal:`https` and when :emphasis:`proxy\_support` is :literal:`parameters\_proxy`. |
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
resource_id (optional, str, None) |
| 174 |
Id of the resource. |
| 175 |
|
| 176 |
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. |
| 177 |
|
| 178 |
|
| 179 |
idrac_ip (True, str, None) |
| 180 |
iDRAC IP Address. |
| 181 |
|
| 182 |
|
| 183 |
idrac_user (False, str, None) |
| 184 |
iDRAC username. |
| 185 |
|
| 186 |
If the username is not provided, then the environment variable :envvar:`IDRAC\_USERNAME` is used. |
| 187 |
|
| 188 |
Example: export IDRAC\_USERNAME=username |
| 189 |
|
| 190 |
|
| 191 |
idrac_password (False, str, None) |
| 192 |
iDRAC user password. |
| 193 |
|
| 194 |
If the password is not provided, then the environment variable :envvar:`IDRAC\_PASSWORD` is used. |
| 195 |
|
| 196 |
Example: export IDRAC\_PASSWORD=password |
| 197 |
|
| 198 |
|
| 199 |
x_auth_token (False, str, None) |
| 200 |
Authentication token. |
| 201 |
|
| 202 |
If the x\_auth\_token is not provided, then the environment variable :envvar:`IDRAC\_X\_AUTH\_TOKEN` is used. |
| 203 |
|
| 204 |
Example: export IDRAC\_X\_AUTH\_TOKEN=x\_auth\_token |
| 205 |
|
| 206 |
|
| 207 |
idrac_port (optional, int, 443) |
| 208 |
iDRAC port. |
| 209 |
|
| 210 |
|
| 211 |
validate_certs (optional, bool, True) |
| 212 |
If :literal:`false`\ , the SSL certificates will not be validated. |
| 213 |
|
| 214 |
Configure :literal:`false` only on personally controlled sites where self-signed certificates are used. |
| 215 |
|
| 216 |
Prior to collection version :literal:`5.0.0`\ , the :emphasis:`validate\_certs` is :literal:`false` by default. |
| 217 |
|
| 218 |
|
| 219 |
ca_path (optional, path, None) |
| 220 |
The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. |
| 221 |
|
| 222 |
|
| 223 |
timeout (optional, int, 30) |
| 224 |
The socket level timeout in seconds. |
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
Notes |
| 231 |
----- |
| 232 |
|
| 233 |
.. note:: |
| 234 |
- Run this module from a system that has direct access to Dell iDRAC. |
| 235 |
- This module supports only iDRAC9 and above. |
| 236 |
- This module supports IPv4 and IPv6 addresses. |
| 237 |
- This module does not support :literal:`check\_mode`. |
| 238 |
- When :emphasis:`share\_type` is :literal:`local` for :emphasis:`import` and :emphasis:`export` operations, job\_details are not displayed. |
| 239 |
- Due to API limitation, proxy parameters are ignored during the :emphasis:`import` operation. |
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
Examples |
| 245 |
-------- |
| 246 |
|
| 247 |
.. code-block:: yaml+jinja |
| 248 |
|
| 249 |
|
| 250 |
--- |
| 251 |
- name: Export a license from iDRAC to local |
| 252 |
dellemc.openmanage.idrac_license: |
| 253 |
idrac_ip: "192.168.0.1" |
| 254 |
idrac_user: "username" |
| 255 |
idrac_password: "password" |
| 256 |
ca_path: "/path/to/ca_cert.pem" |
| 257 |
license_id: "LICENSE_123" |
| 258 |
export: true |
| 259 |
share_parameters: |
| 260 |
share_type: "local" |
| 261 |
share_name: "/path/to/share" |
| 262 |
file_name: "license_file" |
| 263 |
|
| 264 |
- name: Export a license from iDRAC to NFS share |
| 265 |
dellemc.openmanage.idrac_license: |
| 266 |
idrac_ip: "192.168.0.1" |
| 267 |
idrac_user: "username" |
| 268 |
idrac_password: "password" |
| 269 |
ca_path: "/path/to/ca_cert.pem" |
| 270 |
license_id: "LICENSE_123" |
| 271 |
export: true |
| 272 |
share_parameters: |
| 273 |
share_type: "nfs" |
| 274 |
share_name: "/path/to/share" |
| 275 |
file_name: "license_file" |
| 276 |
ip_address: "192.168.0.1" |
| 277 |
|
| 278 |
- name: Export a license from iDRAC to CIFS share |
| 279 |
dellemc.openmanage.idrac_license: |
| 280 |
idrac_ip: "192.168.0.1" |
| 281 |
idrac_user: "username" |
| 282 |
idrac_password: "password" |
| 283 |
ca_path: "/path/to/ca_cert.pem" |
| 284 |
license_id: "LICENSE_123" |
| 285 |
export: true |
| 286 |
share_parameters: |
| 287 |
share_type: "cifs" |
| 288 |
share_name: "/path/to/share" |
| 289 |
file_name: "license_file" |
| 290 |
ip_address: "192.168.0.1" |
| 291 |
username: "username" |
| 292 |
password: "password" |
| 293 |
workgroup: "workgroup" |
| 294 |
|
| 295 |
- name: Export a license from iDRAC to HTTP share via proxy |
| 296 |
dellemc.openmanage.idrac_license: |
| 297 |
idrac_ip: "192.168.0.1" |
| 298 |
idrac_user: "username" |
| 299 |
idrac_password: "password" |
| 300 |
ca_path: "/path/to/ca_cert.pem" |
| 301 |
license_id: "LICENSE_123" |
| 302 |
export: true |
| 303 |
share_parameters: |
| 304 |
share_type: "http" |
| 305 |
share_name: "/path/to/share" |
| 306 |
file_name: "license_file" |
| 307 |
ip_address: "192.168.0.1" |
| 308 |
username: "username" |
| 309 |
password: "password" |
| 310 |
proxy_support: "parameters_proxy" |
| 311 |
proxy_type: socks |
| 312 |
proxy_server: "192.168.0.2" |
| 313 |
proxy_port: 1080 |
| 314 |
proxy_username: "proxy_username" |
| 315 |
proxy_password: "proxy_password" |
| 316 |
|
| 317 |
- name: Export a license from iDRAC to HTTPS share |
| 318 |
dellemc.openmanage.idrac_license: |
| 319 |
idrac_ip: "192.168.0.1" |
| 320 |
idrac_user: "username" |
| 321 |
idrac_password: "password" |
| 322 |
ca_path: "/path/to/ca_cert.pem" |
| 323 |
license_id: "LICENSE_123" |
| 324 |
export: true |
| 325 |
share_parameters: |
| 326 |
share_type: "https" |
| 327 |
share_name: "/path/to/share" |
| 328 |
file_name: "license_file" |
| 329 |
ip_address: "192.168.0.1" |
| 330 |
username: "username" |
| 331 |
password: "password" |
| 332 |
ignore_certificate_warning: "on" |
| 333 |
|
| 334 |
- name: Import a license to iDRAC from local |
| 335 |
dellemc.openmanage.idrac_license: |
| 336 |
idrac_ip: 198.162.0.1 |
| 337 |
idrac_user: "username" |
| 338 |
idrac_password: "password" |
| 339 |
ca_path: "/path/to/ca_cert.pem" |
| 340 |
import: true |
| 341 |
share_parameters: |
| 342 |
file_name: "license_file_name.xml" |
| 343 |
share_type: local |
| 344 |
share_name: "/path/to/share" |
| 345 |
|
| 346 |
- name: Import a license to iDRAC from NFS share |
| 347 |
dellemc.openmanage.idrac_license: |
| 348 |
idrac_ip: 198.162.0.1 |
| 349 |
idrac_user: "username" |
| 350 |
idrac_password: "password" |
| 351 |
ca_path: "/path/to/ca_cert.pem" |
| 352 |
import: true |
| 353 |
share_parameters: |
| 354 |
file_name: "license_file_name.xml" |
| 355 |
share_type: nfs |
| 356 |
ip_address: "192.168.0.1" |
| 357 |
share_name: "/path/to/share" |
| 358 |
|
| 359 |
- name: Import a license to iDRAC from CIFS share |
| 360 |
dellemc.openmanage.idrac_license: |
| 361 |
idrac_ip: 198.162.0.1 |
| 362 |
idrac_user: "username" |
| 363 |
idrac_password: "password" |
| 364 |
ca_path: "/path/to/ca_cert.pem" |
| 365 |
import: true |
| 366 |
share_parameters: |
| 367 |
file_name: "license_file_name.xml" |
| 368 |
share_type: cifs |
| 369 |
ip_address: "192.168.0.1" |
| 370 |
share_name: "/path/to/share" |
| 371 |
username: "username" |
| 372 |
password: "password" |
| 373 |
|
| 374 |
- name: Import a license to iDRAC from HTTP share |
| 375 |
dellemc.openmanage.idrac_license: |
| 376 |
idrac_ip: 198.162.0.1 |
| 377 |
idrac_user: "username" |
| 378 |
idrac_password: "password" |
| 379 |
ca_path: "/path/to/ca_cert.pem" |
| 380 |
import: true |
| 381 |
share_parameters: |
| 382 |
file_name: "license_file_name.xml" |
| 383 |
share_type: http |
| 384 |
ip_address: "192.168.0.1" |
| 385 |
share_name: "/path/to/share" |
| 386 |
username: "username" |
| 387 |
password: "password" |
| 388 |
|
| 389 |
- name: Delete a License from iDRAC |
| 390 |
dellemc.openmanage.idrac_license: |
| 391 |
idrac_ip: 198.162.0.1 |
| 392 |
idrac_user: "username" |
| 393 |
idrac_password: "password" |
| 394 |
ca_path: "/path/to/ca_cert.pem" |
| 395 |
license_id: "LICENCE_123" |
| 396 |
delete: true |
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
Return Values |
| 401 |
------------- |
| 402 |
|
| 403 |
msg (always, str, Successfully exported the license.) |
| 404 |
Status of the license operation. |
| 405 |
|
| 406 |
|
| 407 |
job_details (For import and export operations, dict, {'ActualRunningStartTime': '2024-01-09T05:16:19', 'ActualRunningStopTime': '2024-01-09T05:16:19', 'CompletionTime': '2024-01-09T05:16:19', 'Description': 'Job Instance', 'EndTime': None, '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': None}) |
| 408 |
Returns the output for status of the job. |
| 409 |
|
| 410 |
|
| 411 |
error_info (on HTTP error, dict, {'error': {'code': 'Base.1.8.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.', '@Message.ExtendedInfo': [{'MessageId': 'Base.1.8.AccessDenied', 'Message': 'The authentication credentials included with this request are missing or invalid.', 'MessageArgs': [], 'RelatedProperties': [], 'Severity': 'Critical', 'Resolution': 'Attempt to ensure that the URI is correct and that the service has the appropriate credentials.'}]}}) |
| 412 |
Details of the HTTP Error. |
| 413 |
|
| 414 |
|
| 415 |
|
| 416 |
|
| 417 |
|
| 418 |
Status |
| 419 |
------ |
| 420 |
|
| 421 |
|
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
Authors |
| 426 |
~~~~~~~ |
| 427 |
|
| 428 |
- Rajshekar P(@rajshekarp87) |
| 429 |
- Akash Shendge(@shenda1) |
| 430 |
|