| 1 |
.. _idrac_user_module: |
| 2 |
|
| 3 |
|
| 4 |
idrac_user -- Configure settings for user accounts |
| 5 |
================================================== |
| 6 |
|
| 7 |
.. contents:: |
| 8 |
:local: |
| 9 |
:depth: 1 |
| 10 |
|
| 11 |
|
| 12 |
Synopsis |
| 13 |
-------- |
| 14 |
|
| 15 |
This module allows to perform the following, |
| 16 |
|
| 17 |
Add a new user account. |
| 18 |
|
| 19 |
Edit a user account. |
| 20 |
|
| 21 |
Enable or Disable a user account. |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
Requirements |
| 26 |
------------ |
| 27 |
The below requirements are needed on the host that executes this module. |
| 28 |
|
| 29 |
- python \>= 3.9.6 |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
Parameters |
| 34 |
---------- |
| 35 |
|
| 36 |
state (optional, str, present) |
| 37 |
Select :literal:`present` to create or modify a user account. |
| 38 |
|
| 39 |
Select :literal:`absent` to remove a user account. |
| 40 |
|
| 41 |
|
| 42 |
user_name (True, str, None) |
| 43 |
Provide the :emphasis:`user\_name` of the account to be created, deleted or modified. |
| 44 |
|
| 45 |
|
| 46 |
user_password (optional, str, None) |
| 47 |
Provide the password for the user account. The password can be changed when the user account is modified. |
| 48 |
|
| 49 |
To ensure security, the :emphasis:`user\_password` must be at least eight characters long and must contain lowercase and upper-case characters, numbers, and special characters. |
| 50 |
|
| 51 |
|
| 52 |
new_user_name (optional, str, None) |
| 53 |
Provide the :emphasis:`user\_name` for the account to be modified. |
| 54 |
|
| 55 |
|
| 56 |
privilege (optional, str, None) |
| 57 |
Following are the role-based privileges. |
| 58 |
|
| 59 |
A user with :literal:`Administrator` privilege can log in to iDRAC, and then configure iDRAC, configure users, clear logs, control and configure system, access virtual console, access virtual media, test alerts, and execute debug commands. |
| 60 |
|
| 61 |
A user with :literal:`Operator` privilege can log in to iDRAC, and then configure iDRAC, control and configure system, access virtual console, access virtual media, and execute debug commands. |
| 62 |
|
| 63 |
A user with :literal:`ReadOnly` privilege can only log in to iDRAC. |
| 64 |
|
| 65 |
A user with :literal:`None`\ , no privileges assigned. It is not applicable for iDRAC10. |
| 66 |
|
| 67 |
Will be ignored, if custom\_privilege parameter is provided. |
| 68 |
|
| 69 |
|
| 70 |
custom_privilege (optional, int, None) |
| 71 |
The privilege level assigned to the user. |
| 72 |
|
| 73 |
Minimum value is 1 for iDRAC10. |
| 74 |
|
| 75 |
|
| 76 |
custom_role_name (optional, str, None) |
| 77 |
custom\_role\_name is required for iDRAC10 when creating a user using custom role for iDRAC10. |
| 78 |
|
| 79 |
|
| 80 |
ipmi_lan_privilege (optional, str, None) |
| 81 |
The Intelligent Platform Management Interface LAN privilege level assigned to the user. |
| 82 |
|
| 83 |
|
| 84 |
ipmi_serial_privilege (optional, str, None) |
| 85 |
The Intelligent Platform Management Interface Serial Port privilege level assigned to the user. |
| 86 |
|
| 87 |
This option is only applicable for rack and tower servers. |
| 88 |
|
| 89 |
|
| 90 |
enable (optional, bool, None) |
| 91 |
Provide the option to enable or disable a user from logging in to iDRAC. |
| 92 |
|
| 93 |
|
| 94 |
sol_enable (optional, bool, None) |
| 95 |
Enables Serial Over Lan (SOL) for an iDRAC user. |
| 96 |
|
| 97 |
|
| 98 |
protocol_enable (optional, bool, None) |
| 99 |
Enables protocol for the iDRAC user. |
| 100 |
|
| 101 |
|
| 102 |
authentication_protocol (optional, str, None) |
| 103 |
This option allows to configure one of the following authentication protocol types to authenticate the iDRAC user. |
| 104 |
|
| 105 |
Secure Hash Algorithm :literal:`SHA`. Not applicable for iDRAC10. |
| 106 |
|
| 107 |
Message Digest 5 :literal:`MD5`. Not applicable for iDRAC10. |
| 108 |
|
| 109 |
Secure Hash Algorithm 384-bit :literal:`SHA-384`. Only applicable for iDRAC10. |
| 110 |
|
| 111 |
Secure Hash Algorithm 512-bit :literal:`SHA-512`. Only applicable for iDRAC10. |
| 112 |
|
| 113 |
An authentication protocol is not configured if :literal:`None` is selected. |
| 114 |
|
| 115 |
|
| 116 |
privacy_protocol (optional, str, None) |
| 117 |
This option allows to configure one of the following privacy encryption protocols for the iDRAC user. |
| 118 |
|
| 119 |
Data Encryption Standard :literal:`DES`. Not applicable for iDRAC10. |
| 120 |
|
| 121 |
Advanced Encryption Standard :literal:`AES`. Not applicable for iDRAC10. |
| 122 |
|
| 123 |
Advanced Encryption Standard 256-bit :literal:`AES-256`. Only applicable for iDRAC9 and iDRAC10. |
| 124 |
|
| 125 |
A privacy protocol is not configured if :literal:`None` is selected. |
| 126 |
|
| 127 |
|
| 128 |
idrac_ip (True, str, None) |
| 129 |
iDRAC IP Address. |
| 130 |
|
| 131 |
|
| 132 |
idrac_user (False, str, None) |
| 133 |
iDRAC username. |
| 134 |
|
| 135 |
If the username is not provided, then the environment variable :envvar:`IDRAC\_USERNAME` is used. |
| 136 |
|
| 137 |
Example: export IDRAC\_USERNAME=username |
| 138 |
|
| 139 |
|
| 140 |
idrac_password (False, str, None) |
| 141 |
iDRAC user password. |
| 142 |
|
| 143 |
If the password is not provided, then the environment variable :envvar:`IDRAC\_PASSWORD` is used. |
| 144 |
|
| 145 |
Example: export IDRAC\_PASSWORD=password |
| 146 |
|
| 147 |
|
| 148 |
x_auth_token (False, str, None) |
| 149 |
Authentication token. |
| 150 |
|
| 151 |
If the x\_auth\_token is not provided, then the environment variable :envvar:`IDRAC\_X\_AUTH\_TOKEN` is used. |
| 152 |
|
| 153 |
Example: export IDRAC\_X\_AUTH\_TOKEN=x\_auth\_token |
| 154 |
|
| 155 |
|
| 156 |
idrac_port (optional, int, 443) |
| 157 |
iDRAC port. |
| 158 |
|
| 159 |
|
| 160 |
validate_certs (optional, bool, True) |
| 161 |
If :literal:`false`\ , the SSL certificates will not be validated. |
| 162 |
|
| 163 |
Configure :literal:`false` only on personally controlled sites where self-signed certificates are used. |
| 164 |
|
| 165 |
Prior to collection version :literal:`5.0.0`\ , the :emphasis:`validate\_certs` is :literal:`false` by default. |
| 166 |
|
| 167 |
|
| 168 |
ca_path (optional, path, None) |
| 169 |
The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. |
| 170 |
|
| 171 |
|
| 172 |
timeout (optional, int, 30) |
| 173 |
The socket level timeout in seconds. |
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
Notes |
| 180 |
----- |
| 181 |
|
| 182 |
.. note:: |
| 183 |
- Run this module from a system that has direct access to Dell iDRAC. |
| 184 |
- This module supports :literal:`check\_mode`. |
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
Examples |
| 190 |
-------- |
| 191 |
|
| 192 |
.. code-block:: yaml+jinja |
| 193 |
|
| 194 |
|
| 195 |
--- |
| 196 |
- name: Configure a new iDRAC user |
| 197 |
dellemc.openmanage.idrac_user: |
| 198 |
idrac_ip: 198.162.0.1 |
| 199 |
idrac_user: idrac_user |
| 200 |
idrac_password: idrac_password |
| 201 |
ca_path: "/path/to/ca_cert.pem" |
| 202 |
state: present |
| 203 |
user_name: user_name |
| 204 |
user_password: user_password |
| 205 |
privilege: Administrator |
| 206 |
ipmi_lan_privilege: Administrator |
| 207 |
ipmi_serial_privilege: Administrator |
| 208 |
enable: true |
| 209 |
sol_enable: true |
| 210 |
protocol_enable: true |
| 211 |
authentication_protocol: SHA |
| 212 |
privacy_protocol: AES |
| 213 |
|
| 214 |
- name: Modify existing iDRAC user username and password |
| 215 |
dellemc.openmanage.idrac_user: |
| 216 |
idrac_ip: 198.162.0.1 |
| 217 |
idrac_user: idrac_user |
| 218 |
idrac_password: idrac_password |
| 219 |
ca_path: "/path/to/ca_cert.pem" |
| 220 |
state: present |
| 221 |
user_name: user_name |
| 222 |
new_user_name: new_user_name |
| 223 |
user_password: user_password |
| 224 |
|
| 225 |
- name: Delete existing iDRAC user account |
| 226 |
dellemc.openmanage.idrac_user: |
| 227 |
idrac_ip: 198.162.0.1 |
| 228 |
idrac_user: idrac_user |
| 229 |
idrac_password: idrac_password |
| 230 |
ca_path: "/path/to/ca_cert.pem" |
| 231 |
state: absent |
| 232 |
user_name: user_name |
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
Return Values |
| 237 |
------------- |
| 238 |
|
| 239 |
msg (always, str, Successfully created user account details.) |
| 240 |
Status of the iDRAC user configuration. |
| 241 |
|
| 242 |
|
| 243 |
status (success, dict, {'@Message.ExtendedInfo': [{'Message': 'Successfully Completed Request', 'MessageArgs': [], '[email protected]': 0, 'MessageId': 'Base.1.5.Success', 'RelatedProperties': [], '[email protected]': 0, 'Resolution': 'None', 'Severity': 'OK'}, {'Message': 'The operation successfully completed.', 'MessageArgs': [], '[email protected]': 0, 'MessageId': 'IDRAC.2.1.SYS413', 'RelatedProperties': [], '[email protected]': 0, 'Resolution': 'No response action is required.', 'Severity': 'Informational'}]}) |
| 244 |
Configures the iDRAC users attributes. |
| 245 |
|
| 246 |
|
| 247 |
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.'}]}}) |
| 248 |
Details of the HTTP Error. |
| 249 |
|
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
Status |
| 255 |
------ |
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
Authors |
| 262 |
~~~~~~~ |
| 263 |
|
| 264 |
- Felix Stephen (@felixs88) |
| 265 |
- Kritika Bhateja (@Kritika-Bhateja-03) |
| 266 |
|