| 1 |
.. _idrac_user_info_module: |
| 2 |
|
| 3 |
|
| 4 |
idrac_user_info -- Retrieve details of all users or a specific user on iDRAC. |
| 5 |
============================================================================= |
| 6 |
|
| 7 |
.. contents:: |
| 8 |
:local: |
| 9 |
:depth: 1 |
| 10 |
|
| 11 |
|
| 12 |
Synopsis |
| 13 |
-------- |
| 14 |
|
| 15 |
This module retrieves the list and basic details of all users or details of a specific user 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 |
user_id (optional, int, None) |
| 31 |
Sequential user id numbers that supports from 1 to 16. |
| 32 |
|
| 33 |
\ :emphasis:`user\_id`\ is mutually exclusive with \ :emphasis:`username`\ |
| 34 |
|
| 35 |
|
| 36 |
username (optional, str, None) |
| 37 |
Username of the account that is created in iDRAC local users. |
| 38 |
|
| 39 |
\ :emphasis:`username`\ is mutually exclusive with \ :emphasis:`user\_id`\ |
| 40 |
|
| 41 |
|
| 42 |
idrac_ip (True, str, None) |
| 43 |
iDRAC IP Address. |
| 44 |
|
| 45 |
|
| 46 |
idrac_user (False, str, None) |
| 47 |
iDRAC username. |
| 48 |
|
| 49 |
If the username is not provided, then the environment variable \ :envvar:`IDRAC\_USERNAME`\ is used. |
| 50 |
|
| 51 |
Example: export IDRAC\_USERNAME=username |
| 52 |
|
| 53 |
|
| 54 |
idrac_password (False, str, None) |
| 55 |
iDRAC user password. |
| 56 |
|
| 57 |
If the password is not provided, then the environment variable \ :envvar:`IDRAC\_PASSWORD`\ is used. |
| 58 |
|
| 59 |
Example: export IDRAC\_PASSWORD=password |
| 60 |
|
| 61 |
|
| 62 |
x_auth_token (False, str, None) |
| 63 |
Authentication token. |
| 64 |
|
| 65 |
If the x\_auth\_token is not provided, then the environment variable \ :envvar:`IDRAC\_X\_AUTH\_TOKEN`\ is used. |
| 66 |
|
| 67 |
Example: export IDRAC\_X\_AUTH\_TOKEN=x\_auth\_token |
| 68 |
|
| 69 |
|
| 70 |
idrac_port (optional, int, 443) |
| 71 |
iDRAC port. |
| 72 |
|
| 73 |
|
| 74 |
validate_certs (optional, bool, True) |
| 75 |
If \ :literal:`false`\ , the SSL certificates will not be validated. |
| 76 |
|
| 77 |
Configure \ :literal:`false`\ only on personally controlled sites where self-signed certificates are used. |
| 78 |
|
| 79 |
Prior to collection version \ :literal:`5.0.0`\ , the \ :emphasis:`validate\_certs`\ is \ :literal:`false`\ by default. |
| 80 |
|
| 81 |
|
| 82 |
ca_path (optional, path, None) |
| 83 |
The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. |
| 84 |
|
| 85 |
|
| 86 |
timeout (optional, int, 30) |
| 87 |
The socket level timeout in seconds. |
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
Notes |
| 94 |
----- |
| 95 |
|
| 96 |
.. note:: |
| 97 |
- Run this module on a system that has direct access to Dell iDRAC. |
| 98 |
- This module supports \ :literal:`check\_mode`\ . |
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
Examples |
| 104 |
-------- |
| 105 |
|
| 106 |
.. code-block:: yaml+jinja |
| 107 |
|
| 108 |
|
| 109 |
--- |
| 110 |
- name: Retrieve basic details of all user accounts. |
| 111 |
dellemc.openmanage.idrac_user_info: |
| 112 |
idrac_ip: 198.162.0.1 |
| 113 |
idrac_user: idrac_user |
| 114 |
idrac_password: idrac_password |
| 115 |
ca_path: "/path/to/ca_cert.pem" |
| 116 |
|
| 117 |
- name: Retrieve user details using user_id |
| 118 |
dellemc.openmanage.idrac_user_info: |
| 119 |
idrac_ip: 198.162.0.1 |
| 120 |
idrac_user: idrac_user |
| 121 |
idrac_password: idrac_password |
| 122 |
ca_path: "/path/to/ca_cert.pem" |
| 123 |
user_id: 1 |
| 124 |
|
| 125 |
- name: Retrieve user details using username |
| 126 |
dellemc.openmanage.idrac_user_info: |
| 127 |
idrac_ip: 198.162.0.1 |
| 128 |
idrac_user: idrac_user |
| 129 |
idrac_password: idrac_password |
| 130 |
ca_path: "/path/to/ca_cert.pem" |
| 131 |
username: user_name |
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
Return Values |
| 136 |
------------- |
| 137 |
|
| 138 |
msg (always, str, Successfully retrieved the user information.) |
| 139 |
Status of user information retrieval. |
| 140 |
|
| 141 |
|
| 142 |
user_info (success, list, [{'Description': 'User Account', 'Enabled': False, 'Id': '1', 'Locked': False, 'Name': 'User Account', 'Password': None, 'RoleId': 'None', 'UserName': ''}]) |
| 143 |
Information about the user. |
| 144 |
|
| 145 |
|
| 146 |
error_info (on HTTP error, dict, {'error': {'code': 'Base.1.0.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.', '@Message.ExtendedInfo': [{'MessageId': 'GEN1234', 'RelatedProperties': [], 'Message': 'Unable to process the request because an error occurred.', 'MessageArgs': [], 'Severity': 'Critical', 'Resolution': 'Retry the operation. If the issue persists, contact your system administrator.'}]}}) |
| 147 |
Details of the HTTP Error. |
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
Status |
| 154 |
------ |
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
Authors |
| 161 |
~~~~~~~ |
| 162 |
|
| 163 |
- Husniya Hameed(@husniya_hameed) |
| 164 |
|