| 1 | # idrac_user |
| 2 | |
| 3 | Role to manage local users for iDRAC. |
| 4 | |
| 5 | ## Requirements |
| 6 | |
| 7 | ### Development |
| 8 | |
| 9 | Requirements to develop and contribute to the role. |
| 10 | |
| 11 | ``` |
| 12 | ansible |
| 13 | docker |
| 14 | molecule |
| 15 | python |
| 16 | ``` |
| 17 | |
| 18 | ### Production |
| 19 | |
| 20 | Requirements to use the role. |
| 21 | |
| 22 | ``` |
| 23 | ansible |
| 24 | python |
| 25 | ``` |
| 26 | |
| 27 | ### Ansible collections |
| 28 | |
| 29 | Collections required to use the role |
| 30 | |
| 31 | ``` |
| 32 | dellemc.openmanage |
| 33 | ``` |
| 34 | |
| 35 | ## Role Variables |
| 36 | |
| 37 | <table> |
| 38 | <thead> |
| 39 | <tr> |
| 40 | <th>Name</th> |
| 41 | <th>Required</th> |
| 42 | <th>Default Value</th> |
| 43 | <th>Choices</th> |
| 44 | <th>Type</th> |
| 45 | <th>Description</th> |
| 46 | </tr> |
| 47 | </thead> |
| 48 | <tbody> |
| 49 | <tr> |
| 50 | <td>hostname</td> |
| 51 | <td>true</td> |
| 52 | <td></td> |
| 53 | <td></td> |
| 54 | <td>str</td> |
| 55 | <td>- IPv4, IPv6 Address or hostname of the iDRAC.</td> |
| 56 | </tr> |
| 57 | <tr> |
| 58 | <td>username</td> |
| 59 | <td>true</td> |
| 60 | <td></td> |
| 61 | <td></td> |
| 62 | <td>str</td> |
| 63 | <td>- iDRAC username with 'Administrator' privilege.</td> |
| 64 | </tr> |
| 65 | <tr> |
| 66 | <td>password</td> |
| 67 | <td>true</td> |
| 68 | <td></td> |
| 69 | <td></td> |
| 70 | <td>str</td> |
| 71 | <td>- iDRAC user password.</td> |
| 72 | </tr> |
| 73 | <tr> |
| 74 | <td>https_port</td> |
| 75 | <td>false</td> |
| 76 | <td>443</td> |
| 77 | <td></td> |
| 78 | <td>int</td> |
| 79 | <td>- iDRAC port.</td> |
| 80 | </tr> |
| 81 | <tr> |
| 82 | <td>validate_certs</td> |
| 83 | <td>false</td> |
| 84 | <td>true</td> |
| 85 | <td></td> |
| 86 | <td>bool</td> |
| 87 | <td>- If C(false), the SSL certificates will not be validated.<br>- Configure C(false) only on personally controlled sites where self-signed certificates are used.</td> |
| 88 | </tr> |
| 89 | <tr> |
| 90 | <td>ca_path</td> |
| 91 | <td>false</td> |
| 92 | <td></td> |
| 93 | <td></td> |
| 94 | <td>path</td> |
| 95 | <td>- The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.</td> |
| 96 | </tr> |
| 97 | <tr> |
| 98 | <td>https_timeout</td> |
| 99 | <td>false</td> |
| 100 | <td>30</td> |
| 101 | <td></td> |
| 102 | <td>int</td> |
| 103 | <td>- The HTTPS socket level timeout in seconds.</td> |
| 104 | </tr> |
| 105 | <tr> |
| 106 | <td>state</td> |
| 107 | <td>false</td> |
| 108 | <td>present</td> |
| 109 | <td>[present, absent]</td> |
| 110 | <td>str</td> |
| 111 | <td>- Select C(present) to create or modify a user account.</br>- Select C(absent) to remove a user account.</td> |
| 112 | </tr> |
| 113 | <tr> |
| 114 | <td>user_name</td> |
| 115 | <td>true</td> |
| 116 | <td></td> |
| 117 | <td></td> |
| 118 | <td>str</td> |
| 119 | <td>- Provide username of the iDRAC user account that is created, deleted, or modified.</td> |
| 120 | </tr> |
| 121 | <tr> |
| 122 | <td>user_password</td> |
| 123 | <td>false</td> |
| 124 | <td></td> |
| 125 | <td></td> |
| 126 | <td>str</td> |
| 127 | <td>- Provide password for the iDRAC user account that is created, or modified. The password can be changed when the user account is modified.</br>- To ensure security, the I(user_password) must be at least eight characters long and must contain |
| 128 | lowercase and upper-case characters, numbers, and special characters. |
| 129 | </td> |
| 130 | </tr> |
| 131 | <tr> |
| 132 | <td>new_user_name</td> |
| 133 | <td>false</td> |
| 134 | <td></td> |
| 135 | <td></td> |
| 136 | <td>str</td> |
| 137 | <td>- Provide the I(user_name) for the iDRAC user account that is modified.</td> |
| 138 | </tr> |
| 139 | <tr> |
| 140 | <td>privilege</td> |
| 141 | <td>false</td> |
| 142 | <td></td> |
| 143 | <td>["Administrator","ReadOnly","Operator","None"]</td> |
| 144 | <td>str</td> |
| 145 | <td>- Following are the role-based privileges.</br>- A user with C(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. |
| 146 | </br>- A user with C(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.</br>- A user with C(ReadOnly) privilege can only log in to iDRAC.</br>- A user with C(None), no privileges assigned.</br>- Will be ignored, if I(custom_privilege) parameter is provided.</td> |
| 147 | </tr> |
| 148 | </tr> |
| 149 | <tr> |
| 150 | <td>custom_privilege</td> |
| 151 | <td>false</td> |
| 152 | <td></td> |
| 153 | <td></td> |
| 154 | <td>int</td> |
| 155 | <td>- Provide the custom role-based authority privileges allowed for the user.</br>- To create a custom privilege, add up the privilege decimal values as defined below.</br>Login - 1</br>Configure - 2</br>Configure Users - 4</br>Logs - 8</br>System Control - 16</br>Access Virtual Console - 32</br>Access Virtual Media - 64</br>System Operations - 128</br>Debug - 256</br>- The value has to be in the range 0-511.</td> |
| 156 | </tr> |
| 157 | <tr> |
| 158 | <td>ipmi_lan_privilege</td> |
| 159 | <td>false</td> |
| 160 | <td></td> |
| 161 | <td>["Administrator","ReadOnly","Operator","No Access"]</td> |
| 162 | <td>str</td> |
| 163 | <td>- The Intelligent Platform Management Interface LAN privilege level assigned to the user.</td> |
| 164 | </tr> |
| 165 | <tr> |
| 166 | <td>ipmi_serial_privilege</td> |
| 167 | <td>false</td> |
| 168 | <td></td> |
| 169 | <td>["Administrator","ReadOnly","Operator","No Access"]</td> |
| 170 | <td>str</td> |
| 171 | <td>- The Intelligent Platform Management Interface Serial Port privilege level assigned to the user.</br>- This option is only applicable for rack and tower servers.</td> |
| 172 | </tr> |
| 173 | <tr> |
| 174 | <td>enable</td> |
| 175 | <td>false</td> |
| 176 | <td></td> |
| 177 | <td></td> |
| 178 | <td>bool</td> |
| 179 | <td>Provide the option to enable or disable a user from logging in to iDRAC.</td> |
| 180 | </tr> |
| 181 | <tr> |
| 182 | <td>sol_enable</td> |
| 183 | <td>false</td> |
| 184 | <td></td> |
| 185 | <td></td> |
| 186 | <td>bool</td> |
| 187 | <td>Enables Serial Over Lan (SOL) for an iDRAC user.</td> |
| 188 | </tr> |
| 189 | <tr> |
| 190 | <td>protocol_enable</td> |
| 191 | <td>false</td> |
| 192 | <td></td> |
| 193 | <td></td> |
| 194 | <td>bool</td> |
| 195 | <td>Enables SNMPv3 protocol for the iDRAC user.</td> |
| 196 | </tr> |
| 197 | <tr> |
| 198 | <td>authentication_protocol</td> |
| 199 | <td>false</td> |
| 200 | <td></td> |
| 201 | <td>["None","SHA5","MD5"]</td> |
| 202 | <td>str</td> |
| 203 | <td>- This option allows to configure one of the following authentication protocol types to authenticate the iDRAC user.</br>- Secure Hash Algorithm C(SHA).</br>- Message Digest 5 C(MD5).</br>- If C(None) is selected, then the authentication protocol is not configured.</td> |
| 204 | </tr> |
| 205 | <tr> |
| 206 | <td>privacy_protocol</td> |
| 207 | <td>false</td> |
| 208 | <td></td> |
| 209 | <td>["None","DES","AES"]</td> |
| 210 | <td>str</td> |
| 211 | <td>- This option allows to configure one of the following privacy encryption protocols for the iDRAC user.</br>- Data Encryption Standard C(DES).</br>- Advanced Encryption Standard C(AES).</br>- If C(None) is selected, then the privacy protocol is not configured.</td> |
| 212 | </tr> |
| 213 | |
| 214 | |
| 215 | ## Fact variables |
| 216 | |
| 217 | <table> |
| 218 | <thead> |
| 219 | <tr> |
| 220 | <th>Name</th> |
| 221 | <th>Sample</th> |
| 222 | <th>Description</th> |
| 223 | </tr> |
| 224 | </thead> |
| 225 | <tbody> |
| 226 | <tr> |
| 227 | <td>idrac_user_out</td> |
| 228 | <td>{"changed": true, |
| 229 | "failed": false, |
| 230 | "msg": "Successfully created user account details." |
| 231 | }</td> |
| 232 | <td>Output of the iDRAC user role</td> |
| 233 | </tr> |
| 234 | <tr> |
| 235 | <td>idrac_user_account</td> |
| 236 | <td> |
| 237 | {"changed": true, |
| 238 | "failed": false, |
| 239 | { |
| 240 | "AccountTypes": [ |
| 241 | "Redfish", |
| 242 | "SNMP", |
| 243 | "OEM", |
| 244 | "HostConsole", |
| 245 | "ManagerConsole", |
| 246 | "IPMI", |
| 247 | "KVMIP", |
| 248 | "VirtualMedia", |
| 249 | "WebUI" |
| 250 | ], |
| 251 | "Description": "User Account", |
| 252 | "Enabled": true, |
| 253 | "Id": "2", |
| 254 | "Locked": false, |
| 255 | "Name": "User Account", |
| 256 | "OEMAccountTypes": [ |
| 257 | "IPMI", |
| 258 | "SOL", |
| 259 | "WSMAN", |
| 260 | "UI", |
| 261 | "RACADM" |
| 262 | ], |
| 263 | "Oem": { |
| 264 | "Dell": { |
| 265 | "SNMPv3PassphraseEnabled": "Disabled" |
| 266 | } |
| 267 | }, |
| 268 | "Password": null, |
| 269 | "PasswordChangeRequired": false, |
| 270 | "PasswordExpiration": null, |
| 271 | "RoleId": "Administrator", |
| 272 | "SNMP": { |
| 273 | "AuthenticationKey": null, |
| 274 | "AuthenticationKeySet": true, |
| 275 | "AuthenticationProtocol": "HMAC_MD5", |
| 276 | "EncryptionKey": null, |
| 277 | "EncryptionKeySet": true, |
| 278 | "EncryptionProtocol": "CBC_DES" |
| 279 | }, |
| 280 | "StrictAccountTypes": false, |
| 281 | "UserName": "root" |
| 282 | }" |
| 283 | }</td> |
| 284 | <td>Details of the iDRAC user account that is created or modified.</td> |
| 285 | </tr> |
| 286 | </tbody> |
| 287 | </table> |
| 288 | |
| 289 | ## Examples |
| 290 | |
| 291 | --- |
| 292 | |
| 293 | ```yml |
| 294 | - name: Configure a new iDRAC user |
| 295 | ansible.builtin.import_role: |
| 296 | name: idrac_user |
| 297 | vars: |
| 298 | hostname: "192.1.2.1" |
| 299 | username: "username" |
| 300 | password: "password" |
| 301 | ca_path: "/path/to/ca_cert.pem" |
| 302 | state: present |
| 303 | user_name: user_name |
| 304 | user_password: user_password |
| 305 | privilege: Administrator |
| 306 | ipmi_lan_privilege: Administrator |
| 307 | ipmi_serial_privilege: Administrator |
| 308 | enable: true |
| 309 | sol_enable: true |
| 310 | protocol_enable: true |
| 311 | authentication_protocol: SHA |
| 312 | privacy_protocol: AES |
| 313 | ``` |
| 314 | |
| 315 | ```yml |
| 316 | - name: Modify username and password for the existing iDRAC user |
| 317 | ansible.builtin.import_role: |
| 318 | name: idrac_user |
| 319 | vars: |
| 320 | hostname: "192.1.2.1" |
| 321 | username: "username" |
| 322 | password: "password" |
| 323 | ca_path: "/path/to/ca_cert.pem" |
| 324 | state: present |
| 325 | user_name: user_name |
| 326 | new_user_name: new_user_name |
| 327 | user_password: user_password |
| 328 | ``` |
| 329 | |
| 330 | ```yml |
| 331 | -- name: Delete existing iDRAC user account |
| 332 | ansible.builtin.import_role: |
| 333 | name: idrac_user |
| 334 | vars: |
| 335 | hostname: "192.1.2.1" |
| 336 | username: "username" |
| 337 | password: "password" |
| 338 | ca_path: "/path/to/ca_cert.pem" |
| 339 | state: absent |
| 340 | user_name: user_name |
| 341 | ``` |
| 342 | ## Author Information |
| 343 | |
| 344 | --- |
| 345 | |
| 346 | Dell Technologies <br> |
| 347 | Kritika Bhateja ([email protected]) 2024 |