dellemc.openmanage.idrac_session module – Manage iDRAC sessions
Note
This module is part of the dellemc.openmanage collection (version 9.8.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_session
.
New in dellemc.openmanage 9.2.0
Synopsis
This module allows the creation and deletion of sessions on iDRAC.
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.9.6
Parameters
Parameter |
Comments |
---|---|
The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. |
|
IP address or hostname of the iDRAC. |
|
Password of the iDRAC. If the password is not provided, then the environment variable password is required when state is |
|
Port of the iDRAC. Default: |
|
Session ID of the iDRAC. session_id is required when state is |
|
The state of the session in an iDRAC.
Module will always report changes found to be applied when state is Choices:
|
|
The https socket level timeout in seconds. Default: |
|
Username of the iDRAC. If the username is not provided, then the environment variable username is required when state is |
|
If Configure Choices:
|
|
Authentication token. x_auth_token is required when state is |
Notes
Note
Run this module from a system that has direct access to Dell iDRAC.
This module supports IPv4 and IPv6 addresses.
This module supports
check_mode
.This module will always report changes found to be applied when state is
present
.
Examples
---
- name: Create a session
dellemc.openmanage.idrac_session:
hostname: 198.162.0.1
username: username
password: password
ca_path: "/path/to/ca_cert.pem"
state: present
- name: Delete a session
dellemc.openmanage.idrac_session:
hostname: 198.162.0.1
ca_path: "/path/to/ca_cert.pem"
state: absent
x_auth_token: aed4aa802b748d2f3b31deec00a6b28a
session_id: 2
- name: Create a session and execute other modules
block:
- name: Create a session
dellemc.openmanage.idrac_session:
hostname: 198.162.0.1
username: username
password: password
ca_path: "/path/to/ca_cert.pem"
state: present
register: authData
- name: Call idrac_firmware_info module
dellemc.openmanage.idrac_firmware_info:
idrac_ip: 198.162.0.1
ca_path: "/path/to/ca_cert.pem"
x_auth_token: "{{ authData.x_auth_token }}"
- name: Call idrac_user_info module
dellemc.openmanage.idrac_user_info:
idrac_ip: 198.162.0.1
ca_path: "/path/to/ca_cert.pem"
x_auth_token: "{{ authData.x_auth_token }}"
always:
- name: Destroy a session
dellemc.openmanage.idrac_session:
hostname: 198.162.0.1
ca_path: "/path/to/ca_cert.pem"
state: absent
x_auth_token: "{{ authData.x_auth_token }}"
session_id: "{{ authData.session_data.Id }}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Details of the HTTP Error. Returned: On HTTP error Sample: |
|
Status of the session operation. Returned: always Sample: |
|
The session details. Returned: For session creation operation Sample: |
|
Authentication token. Returned: For session creation operation Sample: |