| 1 | # idrac_storage_controller |
| 2 | |
| 3 | Role to configure the physical disk, virtual disk, and storage controller settings on iDRAC9 based PowerEdge servers. |
| 4 | |
| 5 | ## Requirements |
| 6 | |
| 7 | ### Development |
| 8 | Requirements to develop and contribute to the role. |
| 9 | ``` |
| 10 | ansible |
| 11 | docker |
| 12 | molecule |
| 13 | python |
| 14 | ``` |
| 15 | |
| 16 | ### Production |
| 17 | Requirements to use the role. |
| 18 | ``` |
| 19 | ansible |
| 20 | python |
| 21 | ``` |
| 22 | |
| 23 | ### Ansible collections |
| 24 | Collections required to use the role |
| 25 | ``` |
| 26 | dellemc.openmanage |
| 27 | ``` |
| 28 | |
| 29 | ## Role Variables |
| 30 | |
| 31 | <table> |
| 32 | <thead> |
| 33 | <tr> |
| 34 | <th>Name</th> |
| 35 | <th>Required</th> |
| 36 | <th>Default Value</th> |
| 37 | <th>Choices</th> |
| 38 | <th>Type</th> |
| 39 | <th>Description</th> |
| 40 | </tr> |
| 41 | </thead> |
| 42 | <tbody> |
| 43 | <tr> |
| 44 | <td>hostname</td> |
| 45 | <td>true</td> |
| 46 | <td></td> |
| 47 | <td></td> |
| 48 | <td>str</td> |
| 49 | <td>- iDRAC IP Address</td> |
| 50 | </tr> |
| 51 | <tr> |
| 52 | <td>username</td> |
| 53 | <td>true</td> |
| 54 | <td></td> |
| 55 | <td></td> |
| 56 | <td>str</td> |
| 57 | <td>- iDRAC username</td> |
| 58 | </tr> |
| 59 | <tr> |
| 60 | <td>password</td> |
| 61 | <td>true</td> |
| 62 | <td></td> |
| 63 | <td></td> |
| 64 | <td>str</td> |
| 65 | <td>- iDRAC user password</td> |
| 66 | </tr> |
| 67 | <tr> |
| 68 | <td>https_port</td> |
| 69 | <td>false</td> |
| 70 | <td>443</td> |
| 71 | <td></td> |
| 72 | <td>int</td> |
| 73 | <td>- iDRAC port.</td> |
| 74 | </tr> |
| 75 | <tr> |
| 76 | <td>validate_certs</td> |
| 77 | <td>false</td> |
| 78 | <td>true</td> |
| 79 | <td></td> |
| 80 | <td>bool</td> |
| 81 | <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> |
| 82 | </tr> |
| 83 | <tr> |
| 84 | <td>ca_path</td> |
| 85 | <td>false</td> |
| 86 | <td></td> |
| 87 | <td></td> |
| 88 | <td>path</td> |
| 89 | <td>- The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.</td> |
| 90 | </tr> |
| 91 | <tr> |
| 92 | <td>https_timeout</td> |
| 93 | <td>false</td> |
| 94 | <td>30</td> |
| 95 | <td></td> |
| 96 | <td>int</td> |
| 97 | <td>- The HTTPS socket level timeout in seconds.</td> |
| 98 | </tr> |
| 99 | <tr> |
| 100 | <td>controller_id</td> |
| 101 | <td>true</td> |
| 102 | <td></td> |
| 103 | <td></td> |
| 104 | <td>str</td> |
| 105 | <td>- The ID of the controller on which the operations need to be performed.</td> |
| 106 | </tr> |
| 107 | <tr> |
| 108 | <td>volumes</td> |
| 109 | <td>false</td> |
| 110 | <td></td> |
| 111 | <td></td> |
| 112 | <td>dict</td> |
| 113 | <td>- List of volume that belongs to I(controller_id).</td> |
| 114 | </tr> |
| 115 | <tr> |
| 116 | <td> id</td> |
| 117 | <td>true</td> |
| 118 | <td></td> |
| 119 | <td></td> |
| 120 | <td>str</td> |
| 121 | <td>- Fully Qualified Device Descriptor (FQDD) of the volume.</td> |
| 122 | </tr> |
| 123 | <tr> |
| 124 | <td> dedicated_hot_spare</td> |
| 125 | <td>false</td> |
| 126 | <td></td> |
| 127 | <td></td> |
| 128 | <td>str</td> |
| 129 | <td>- Fully Qualified Device Descriptor (FQDD) of the physical disk to assign the volume as a dedicated hot spare to a disk.</td> |
| 130 | </tr> |
| 131 | <tr> |
| 132 | <td> encrypted</td> |
| 133 | <td>false</td> |
| 134 | <td></td> |
| 135 | <td></td> |
| 136 | <td>bool</td> |
| 137 | <td>- To encrypt the virtual disk.</td> |
| 138 | </tr> |
| 139 | <tr> |
| 140 | <td> expand_capacity_disk</td> |
| 141 | <td>false</td> |
| 142 | <td></td> |
| 143 | <td></td> |
| 144 | <td>str</td> |
| 145 | <td>- Fully Qualified Device Descriptor (FQDD) of the disk for expanding the capacity with the existing disk.<br>- I(expand_capacity_size) is mutually exclusive with I(expand_capacity_disk).</td> |
| 146 | </tr> |
| 147 | <tr> |
| 148 | <td> expand_capacity_size</td> |
| 149 | <td>false</td> |
| 150 | <td></td> |
| 151 | <td></td> |
| 152 | <td>str</td> |
| 153 | <td>- Capacity of the virtual disk to be expanded in MB.<br>- Check mode and Idempotency is not supported for I(expand_capacity_size).<br>- Minimum Online Capacity Expansion size must be greater than 100 MB of the current size.<br>- I(expand_capacity_disk) is mutually exclusive with I(expand_capacity_size).</td> |
| 154 | </tr> |
| 155 | <tr> |
| 156 | <td> blink</td> |
| 157 | <td>false</td> |
| 158 | <td></td> |
| 159 | <td></td> |
| 160 | <td>bool</td> |
| 161 | <td>- Blinks the target virtual disk, and it always reports as changes found when check mode is enabled.</td> |
| 162 | </tr> |
| 163 | <tr> |
| 164 | <td>disks</td> |
| 165 | <td>false</td> |
| 166 | <td></td> |
| 167 | <td></td> |
| 168 | <td>dict</td> |
| 169 | <td>- List of physical disks that belongs to I(controller_id).</td> |
| 170 | </tr> |
| 171 | <tr> |
| 172 | <td> id</td> |
| 173 | <td>true</td> |
| 174 | <td></td> |
| 175 | <td></td> |
| 176 | <td>str</td> |
| 177 | <td>- Fully Qualified Device Descriptor (FQDD) of the physical disk.</td> |
| 178 | </tr> |
| 179 | <tr> |
| 180 | <td> blink</td> |
| 181 | <td>false</td> |
| 182 | <td></td> |
| 183 | <td></td> |
| 184 | <td>bool</td> |
| 185 | <td>- Blinks the target physical disk, and it always reports as changes found when check mode is enabled.</td> |
| 186 | </tr> |
| 187 | <tr> |
| 188 | <td> raid_state</td> |
| 189 | <td>false</td> |
| 190 | <td></td> |
| 191 | <td>'raid', 'nonraid'</td> |
| 192 | <td>str</td> |
| 193 | <td>- Converts the disk form Non-Raid to Raid and vice versa.<br>- C(raid) converts the physical disk to Raid.<br>- C(nonraid) converts the physical disk to Non Raid.</td> |
| 194 | </tr> |
| 195 | <tr> |
| 196 | <td> status</td> |
| 197 | <td>false</td> |
| 198 | <td></td> |
| 199 | <td>'online', 'offline'</td> |
| 200 | <td>str</td> |
| 201 | <td>- Converts the disk form online to offline and vice versa.<br>- C(online) converts the physical disk status to online.<br>- C(offline) converts the physical disk status to offline.</td> |
| 202 | </tr> |
| 203 | <tr> |
| 204 | <td> global_hot_spare</td> |
| 205 | <td>false</td> |
| 206 | <td></td> |
| 207 | <td></td> |
| 208 | <td>bool</td> |
| 209 | <td>- Assigns a global hot spare or unassigns a hot spare.<br>- C(true) assigns the disk as a global hot spare.<br>- C(false) unassigns the disk as a hot spare.</td> |
| 210 | </tr> |
| 211 | <tr> |
| 212 | <td> erase</td> |
| 213 | <td>false</td> |
| 214 | <td></td> |
| 215 | <td></td> |
| 216 | <td>bool</td> |
| 217 | <td>- Securely erase a device. <br>- C(true) securely erase the disk.<br>- C(false) skips the secure erase operation.</td> |
| 218 | </tr> |
| 219 | <tr> |
| 220 | <td>reset_config</td> |
| 221 | <td>false</td> |
| 222 | <td></td> |
| 223 | <td></td> |
| 224 | <td>bool</td> |
| 225 | <td>- To reset the controller.</td> |
| 226 | </tr> |
| 227 | <tr> |
| 228 | <td>set_controller_key</td> |
| 229 | <td>false</td> |
| 230 | <td></td> |
| 231 | <td></td> |
| 232 | <td>bool</td> |
| 233 | <td>- Set the security key or enable controller encryption.<br>- If I(mode) is provided controller encryption operation is performed, otherwise sets the controller security key.<br>- I(key), and I(key_id) are required for this operation.</td> |
| 234 | </tr> |
| 235 | <tr> |
| 236 | <td>rekey</td> |
| 237 | <td>false</td> |
| 238 | <td></td> |
| 239 | <td></td> |
| 240 | <td>bool</td> |
| 241 | <td>- Resets the key on the controller, and it always reports as changes found when check mode is enabled.</td> |
| 242 | </tr> |
| 243 | <tr> |
| 244 | <td>remove_key</td> |
| 245 | <td>false</td> |
| 246 | <td></td> |
| 247 | <td></td> |
| 248 | <td>bool</td> |
| 249 | <td>- Remove the key on controllers.</td> |
| 250 | </tr> |
| 251 | <tr> |
| 252 | <td>key</td> |
| 253 | <td>false</td> |
| 254 | <td></td> |
| 255 | <td></td> |
| 256 | <td>str</td> |
| 257 | <td>- A new security key passphrase that the encryption-capable controller uses to create the encryption key. The controller uses the encryption key to lock or unlock access to the Self-Encrypting Drive (SED). Only one encryption key can be created for each controller.<br>- This is mandatory when I(set_controller_key) is C(true), I(rekey) is C(true).<br>- The length of the key can be a maximum of 32 characters in length, where the expanded form of the special character is counted as a single character.<br>- The key must contain at least one character from each of the character classes are uppercase, lowercase, number, and special character.</td> |
| 258 | </tr> |
| 259 | <tr> |
| 260 | <td>key_id</td> |
| 261 | <td>false</td> |
| 262 | <td></td> |
| 263 | <td></td> |
| 264 | <td>str</td> |
| 265 | <td>- This is a user supplied text label associated with the passphrase.<br>- This is mandatory when I(set_controller_key) is C(true), I(rekey) is C(true).<br>- The length of I(key_id) can be a maximum of 32 characters in length and should not have any spaces.</td> |
| 266 | </tr> |
| 267 | <tr> |
| 268 | <td>old_key</td> |
| 269 | <td>false</td> |
| 270 | <td></td> |
| 271 | <td></td> |
| 272 | <td>str</td> |
| 273 | <td>- Security key passphrase used by the encryption-capable controller.<br>- This option is mandatory when I(rekey) is C(true).</td> |
| 274 | </tr> |
| 275 | <tr> |
| 276 | <td>mode</td> |
| 277 | <td>false</td> |
| 278 | <td></td> |
| 279 | <td>'LKM', 'SEKM'</td> |
| 280 | <td>str</td> |
| 281 | <td>- Encryption mode of the encryption capable controller.<br>- This option is mandatory when I(rekey) is C(true) and for enabling controller encryption.<br>- C(SEKM) to choose mode as secure enterprise key manager.<br>- C(LKM) to choose mode as local key management.</td> |
| 282 | </tr> |
| 283 | <tr> |
| 284 | <td>attributes</td> |
| 285 | <td>false</td> |
| 286 | <td></td> |
| 287 | <td></td> |
| 288 | <td>dict</td> |
| 289 | <td>- Dictionary of controller attributes and value pair.<br>- This feature is only supported for iDRAC9 with firmware version 6.00.00.00 and above.<br>- I(controller_id) is required for this operation.<br>- I(apply_time) and I(maintenance_window) is applicable for I(attributes).<br>- Use U(https://I(idrac_ip)/redfish/v1/Schemas/DellOemStorageController.json) to view the attributes.</td> |
| 290 | </tr> |
| 291 | <tr> |
| 292 | <td>apply_time</td> |
| 293 | <td>false</td> |
| 294 | <td>Immediate</td> |
| 295 | <td>'Immediate', 'OnReset', 'AtMaintenanceWindowStart', 'InMaintenanceWindowOnReset'</td> |
| 296 | <td>str</td> |
| 297 | <td>- Apply time of the I(attributes).<br>- This is applicable only to I(attributes).<br>- C(Immediate) Allows the user to immediately reboot the host and apply the changes. I(job_wait) is applicable.<br>- C(OnReset) Allows the user to apply the changes on the next reboot of the host server.<br>- C(AtMaintenanceWindowStart) Allows the user to apply the changes at the start of a maintenance window as specified in I(maintenance_window).<br>- C(InMaintenanceWindowOnReset) Allows the users to apply after a manual reset but within the maintenance window as specified in I(maintenance_window).</td> |
| 298 | </tr> |
| 299 | <tr> |
| 300 | <td>maintenance_window</td> |
| 301 | <td>false</td> |
| 302 | <td></td> |
| 303 | <td></td> |
| 304 | <td>dict</td> |
| 305 | <td>- Option to schedule the maintenance window.<br>- This is required when I(apply_time) is C(AtMaintenanceWindowStart) or C(InMaintenanceWindowOnReset).</td> |
| 306 | </tr> |
| 307 | <tr> |
| 308 | <td> start_time</td> |
| 309 | <td>true</td> |
| 310 | <td></td> |
| 311 | <td></td> |
| 312 | <td>str</td> |
| 313 | <td>- The start time for the maintenance window to be scheduled.<br>- The format is YYYY-MM-DDThh:mm:ss<offset>.<br>- <offset> is the time offset from UTC that the current timezone set in iDRAC in the format is +05:30 for IST.</td> |
| 314 | </tr> |
| 315 | <tr> |
| 316 | <td> duration</td> |
| 317 | <td>false</td> |
| 318 | <td>900</td> |
| 319 | <td></td> |
| 320 | <td>int</td> |
| 321 | <td>- The duration in seconds for the maintenance window.</td> |
| 322 | </tr> |
| 323 | </tbody> |
| 324 | </table> |
| 325 | |
| 326 | ## Fact variables |
| 327 | |
| 328 | <table> |
| 329 | <thead> |
| 330 | <tr> |
| 331 | <th>Name</th> |
| 332 | <th>Sample</th> |
| 333 | <th>Description</th> |
| 334 | </tr> |
| 335 | </thead> |
| 336 | <tbody> |
| 337 | <tr> |
| 338 | <td>idrac_storage_controller_out</td> |
| 339 | <td> |
| 340 | <pre> |
| 341 | <code class="json"> |
| 342 | { |
| 343 | "assign_dedicated_spare": { |
| 344 | "changed": false, |
| 345 | "false_condition": "volumes.id is defined and volumes.dedicated_hot_spare is defined", |
| 346 | "skip_reason": "Conditional result was False", |
| 347 | "skipped": true |
| 348 | }, |
| 349 | "assign_global_spare": { |
| 350 | "changed": false, |
| 351 | "false_condition": "disks.id is defined and disks.global_hot_spare is true", |
| 352 | "skip_reason": "Conditional result was False", |
| 353 | "skipped": true |
| 354 | }, |
| 355 | "blink_pd": { |
| 356 | "changed": false, |
| 357 | "false_condition": "disks.blink is defined", |
| 358 | "skip_reason": "Conditional result was False", |
| 359 | "skipped": true |
| 360 | }, |
| 361 | "blink_vd": { |
| 362 | "changed": false, |
| 363 | "false_condition": "volumes.blink is defined", |
| 364 | "skip_reason": "Conditional result was False", |
| 365 | "skipped": true |
| 366 | }, |
| 367 | "controller_attributes_config": { |
| 368 | "changed": false, |
| 369 | "false_condition": "attributes is defined", |
| 370 | "skip_reason": "Conditional result was False", |
| 371 | "skipped": true |
| 372 | }, |
| 373 | "controller_rekey": { |
| 374 | "changed": false, |
| 375 | "false_condition": "rekey is true", |
| 376 | "skip_reason": "Conditional result was False", |
| 377 | "skipped": true |
| 378 | }, |
| 379 | "controller_reset_config": { |
| 380 | "changed": false, |
| 381 | "false_condition": "reset_config is true", |
| 382 | "skip_reason": "Conditional result was False", |
| 383 | "skipped": true |
| 384 | }, |
| 385 | "enable_encryption": { |
| 386 | "changed": false, |
| 387 | "false_condition": "set_controller_key is true and key is defined and key_id is defined and mode is defined", |
| 388 | "skip_reason": "Conditional result was False", |
| 389 | "skipped": true |
| 390 | }, |
| 391 | "lock_vd": { |
| 392 | "changed": false, |
| 393 | "false_condition": "volumes.encrypted is true", |
| 394 | "skip_reason": "Conditional result was False", |
| 395 | "skipped": true |
| 396 | }, |
| 397 | "oce_vd": { |
| 398 | "changed": false, |
| 399 | "false_condition": "volumes.expand_capacity_disk is defined or volumes.expand_capacity_size is defined", |
| 400 | "skip_reason": "Conditional result was False", |
| 401 | "skipped": true |
| 402 | }, |
| 403 | "physical_disk_raid_state": { |
| 404 | "changed": false, |
| 405 | "false_condition": "disks.raid_state is defined", |
| 406 | "skip_reason": "Conditional result was False", |
| 407 | "skipped": true |
| 408 | }, |
| 409 | "physical_disk_state": { |
| 410 | "changed": false, |
| 411 | "false_condition": "disks.status is defined", |
| 412 | "skip_reason": "Conditional result was False", |
| 413 | "skipped": true |
| 414 | }, |
| 415 | "remove_controller_key": { |
| 416 | "changed": false, |
| 417 | "false_condition": "remove_key is true", |
| 418 | "skip_reason": "Conditional result was False", |
| 419 | "skipped": true |
| 420 | }, |
| 421 | "secure_erase": { |
| 422 | "changed": false, |
| 423 | "failed": false, |
| 424 | "msg": "Successfully submitted the job that performs the 'SecureErase' operation.", |
| 425 | "status": { |
| 426 | "ActualRunningStartTime": null, |
| 427 | "ActualRunningStopTime": null, |
| 428 | "CompletionTime": null, |
| 429 | "Description": "Job Instance", |
| 430 | "EndTime": "TIME_NA", |
| 431 | "Id": "JID_XXXXXXXXXXX", |
| 432 | "JobState": "ReadyForExecution", |
| 433 | "JobType": "RealTimeNoRebootConfiguration", |
| 434 | "Message": "New", |
| 435 | "MessageArgs": [], |
| 436 | "MessageId": "JCP000", |
| 437 | "Name": "Configure: RAID.Integrated.1-1", |
| 438 | "PercentComplete": 0, |
| 439 | "StartTime": "2024-07-09T01:35:18", |
| 440 | "TargetSettingsURI": null |
| 441 | }, |
| 442 | "task": { |
| 443 | "id": "JID_XXXXXXXXXXX", |
| 444 | "uri": "/redfish/v1/Managers/iDRAC.Embedded.1/Oem/Dell/Jobs/JID_XXXXXXXXXXX" |
| 445 | } |
| 446 | }, |
| 447 | "set_controller_key": { |
| 448 | "changed": false, |
| 449 | "false_condition": "set_controller_key is true and key is defined and key_id is defined and mode is undefined", |
| 450 | "skip_reason": "Conditional result was False", |
| 451 | "skipped": true |
| 452 | }, |
| 453 | "unassign_hotspare": { |
| 454 | "changed": false, |
| 455 | "false_condition": "disks.global_hot_spare is false and disks.id is defined", |
| 456 | "skip_reason": "Conditional result was False", |
| 457 | "skipped": true |
| 458 | } |
| 459 | } |
| 460 | </code> |
| 461 | </pre> |
| 462 | </td> |
| 463 | <td>Returns the output of the idrac_storage_controller</td> |
| 464 | </tbody> |
| 465 | </table> |
| 466 | |
| 467 | ## Example Playbook |
| 468 | |
| 469 | ``` |
| 470 | - name: Reset controller configuration |
| 471 | ansible.builtin.include_role: |
| 472 | name: idrac_storage_controller |
| 473 | vars: |
| 474 | hostname: 192.168.0.0 |
| 475 | username: username |
| 476 | password: password |
| 477 | ca_path: "/path/to/ca_cert.pem" |
| 478 | controller_id: RAID.Slot.1-1 |
| 479 | reset_config: true |
| 480 | ``` |
| 481 | |
| 482 | ``` |
| 483 | - name: Set controller attributes |
| 484 | ansible.builtin.include_role: |
| 485 | name: idrac_storage_controller |
| 486 | vars: |
| 487 | hostname: 192.168.0.1 |
| 488 | username: username |
| 489 | password: password |
| 490 | ca_path: "/path/to/ca_cert.pem" |
| 491 | controller_id: RAID.Slot.1-1 |
| 492 | attributes: |
| 493 | ControllerMode: HBA |
| 494 | apply_time: Immediate |
| 495 | ``` |
| 496 | |
| 497 | ``` |
| 498 | - name: Set controller attributes at maintenance window |
| 499 | ansible.builtin.include_role: |
| 500 | name: idrac_storage_controller |
| 501 | vars: |
| 502 | hostname: 192.168.0.1 |
| 503 | username: username |
| 504 | password: password |
| 505 | ca_path: "/path/to/ca_cert.pem" |
| 506 | controller_id: RAID.Slot.1-1 |
| 507 | attributes: |
| 508 | CheckConsistencyMode: Normal |
| 509 | LoadBalanceMode: Disabled |
| 510 | apply_time: AtMaintenanceWindowStart |
| 511 | maintenance_window: |
| 512 | start_time: "2022-09-30T05:15:40-05:00" |
| 513 | duration: 1200 |
| 514 | ``` |
| 515 | |
| 516 | ``` |
| 517 | - name: Set controller encryption key |
| 518 | ansible.builtin.include_role: |
| 519 | name: idrac_storage_controller |
| 520 | vars: |
| 521 | hostname: 192.168.0.1 |
| 522 | username: username |
| 523 | password: password |
| 524 | ca_path: "/path/to/ca_cert.pem" |
| 525 | controller_id: RAID.Slot.1-1 |
| 526 | key: PassPhrase@123 |
| 527 | key_id: MyKeyId123 |
| 528 | set_controller_key: true |
| 529 | ``` |
| 530 | |
| 531 | ``` |
| 532 | - name: Rekey in LKM mode |
| 533 | ansible.builtin.include_role: |
| 534 | name: idrac_storage_controller |
| 535 | vars: |
| 536 | hostname: 192.168.0.1 |
| 537 | username: username |
| 538 | password: password |
| 539 | ca_path: "/path/to/ca_cert.pem" |
| 540 | controller_id: RAID.Slot.1-1 |
| 541 | rekey: true |
| 542 | key: PassPhrase@123 |
| 543 | key_id: mykeyid123 |
| 544 | old_key: OldPhassParse@123 |
| 545 | mode: LKM |
| 546 | ``` |
| 547 | |
| 548 | ``` |
| 549 | - name: Rekey in SEKM mode |
| 550 | ansible.builtin.include_role: |
| 551 | name: idrac_storage_controller |
| 552 | vars: |
| 553 | hostname: 192.168.0.1 |
| 554 | username: username |
| 555 | password: password |
| 556 | ca_path: "/path/to/ca_cert.pem" |
| 557 | controller_id: RAID.Slot.1-1 |
| 558 | rekey: true |
| 559 | key: PassPhrase@123 |
| 560 | key_id: mykeyid123 |
| 561 | old_key: OldPhassParse@123 |
| 562 | mode: SEKM |
| 563 | ``` |
| 564 | |
| 565 | ``` |
| 566 | - name: Remove controller encryption key |
| 567 | ansible.builtin.include_role: |
| 568 | name: idrac_storage_controller |
| 569 | vars: |
| 570 | hostname: 192.168.0.1 |
| 571 | username: username |
| 572 | password: password |
| 573 | ca_path: "/path/to/ca_cert.pem" |
| 574 | controller_id: RAID.Slot.1-1 |
| 575 | remove_key: true |
| 576 | ``` |
| 577 | |
| 578 | ``` |
| 579 | - name: Enable controller encryption |
| 580 | ansible.builtin.include_role: |
| 581 | name: idrac_storage_controller |
| 582 | vars: |
| 583 | hostname: 192.168.0.1 |
| 584 | username: username |
| 585 | password: password |
| 586 | ca_path: "/path/to/ca_cert.pem" |
| 587 | controller_id: RAID.Slot.1-1 |
| 588 | set_controller_key: true |
| 589 | key: your_key@123 |
| 590 | key_id: your_keyid@123 |
| 591 | mode: LKM |
| 592 | ``` |
| 593 | |
| 594 | ``` |
| 595 | - name: Change physical disk state to online |
| 596 | ansible.builtin.include_role: |
| 597 | name: idrac_storage_controller |
| 598 | vars: |
| 599 | hostname: 192.168.0.1 |
| 600 | username: username |
| 601 | password: password |
| 602 | ca_path: "/path/to/ca_cert.pem" |
| 603 | controller_id: RAID.Slot.1-1 |
| 604 | disks: |
| 605 | id: Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 606 | status: online |
| 607 | ``` |
| 608 | |
| 609 | ``` |
| 610 | - name: Change physical disk state to offline |
| 611 | ansible.builtin.include_role: |
| 612 | name: idrac_storage_controller |
| 613 | vars: |
| 614 | hostname: 192.168.0.1 |
| 615 | username: username |
| 616 | password: password |
| 617 | ca_path: "/path/to/ca_cert.pem" |
| 618 | controller_id: RAID.Slot.1-1 |
| 619 | disks: |
| 620 | id: Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 621 | status: offline |
| 622 | ``` |
| 623 | |
| 624 | ``` |
| 625 | - name: Convert physical disk to RAID mode |
| 626 | ansible.builtin.include_role: |
| 627 | name: idrac_storage_controller |
| 628 | vars: |
| 629 | hostname: 192.168.0.1 |
| 630 | username: username |
| 631 | password: password |
| 632 | ca_path: "/path/to/ca_cert.pem" |
| 633 | controller_id: RAID.Slot.1-1 |
| 634 | disks: |
| 635 | id: Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 636 | raid_state: raid |
| 637 | ``` |
| 638 | |
| 639 | ``` |
| 640 | - name: Convert physical disk to Non-RAID mode |
| 641 | ansible.builtin.include_role: |
| 642 | name: idrac_storage_controller |
| 643 | vars: |
| 644 | hostname: 192.168.0.1 |
| 645 | username: username |
| 646 | password: password |
| 647 | ca_path: "/path/to/ca_cert.pem" |
| 648 | controller_id: RAID.Slot.1-1 |
| 649 | disks: |
| 650 | id: Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 651 | raid_state: nonraid |
| 652 | ``` |
| 653 | |
| 654 | ``` |
| 655 | - name: Assign dedicated hot spare. |
| 656 | ansible.builtin.include_role: |
| 657 | name: idrac_storage_controller |
| 658 | vars: |
| 659 | hostname: 192.168.0.1 |
| 660 | username: username |
| 661 | password: password |
| 662 | ca_path: "/path/to/ca_cert.pem" |
| 663 | controller_id: RAID.Slot.1-1 |
| 664 | volumes: |
| 665 | id: Disk.Virtual.0:RAID.Slot.1-1 |
| 666 | dedicated_hot_spare: Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 667 | ``` |
| 668 | |
| 669 | ``` |
| 670 | - name: Assign global hot spare. |
| 671 | ansible.builtin.include_role: |
| 672 | name: idrac_storage_controller |
| 673 | vars: |
| 674 | hostname: 192.168.0.1 |
| 675 | username: username |
| 676 | password: password |
| 677 | ca_path: "/path/to/ca_cert.pem" |
| 678 | controller_id: RAID.Slot.1-1 |
| 679 | disks: |
| 680 | id: Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 681 | global_hot_spare: true |
| 682 | ``` |
| 683 | |
| 684 | ``` |
| 685 | - name: Unassign hot spare. |
| 686 | ansible.builtin.include_role: |
| 687 | name: idrac_storage_controller |
| 688 | vars: |
| 689 | hostname: 192.168.0.1 |
| 690 | username: username |
| 691 | password: password |
| 692 | ca_path: "/path/to/ca_cert.pem" |
| 693 | controller_id: RAID.Slot.1-1 |
| 694 | disks: |
| 695 | id: Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 696 | global_hot_spare: false |
| 697 | ``` |
| 698 | |
| 699 | ``` |
| 700 | - name: Lock virtual drive. |
| 701 | ansible.builtin.include_role: |
| 702 | name: idrac_storage_controller |
| 703 | vars: |
| 704 | hostname: 192.168.0.1 |
| 705 | username: username |
| 706 | password: password |
| 707 | ca_path: "/path/to/ca_cert.pem" |
| 708 | controller_id: RAID.Slot.1-1 |
| 709 | volumes: |
| 710 | id: Disk.Virtual.0:RAID.Slot.1-1 |
| 711 | encrypted: true |
| 712 | ``` |
| 713 | |
| 714 | ``` |
| 715 | - name: Online capacity expansion of volume using size. |
| 716 | ansible.builtin.include_role: |
| 717 | name: idrac_storage_controller |
| 718 | vars: |
| 719 | hostname: 192.168.0.1 |
| 720 | username: username |
| 721 | password: password |
| 722 | ca_path: "/path/to/ca_cert.pem" |
| 723 | controller_id: RAID.Slot.1-1 |
| 724 | volumes: |
| 725 | id: Disk.Virtual.0:RAID.Slot.1-1 |
| 726 | expand_capacity_size: 362785 |
| 727 | ``` |
| 728 | |
| 729 | ``` |
| 730 | - name: Online capacity expansion of volume using target. |
| 731 | ansible.builtin.include_role: |
| 732 | name: idrac_storage_controller |
| 733 | vars: |
| 734 | hostname: 192.168.0.1 |
| 735 | username: username |
| 736 | password: password |
| 737 | ca_path: "/path/to/ca_cert.pem" |
| 738 | controller_id: RAID.Slot.1-1 |
| 739 | volumes: |
| 740 | id: Disk.Virtual.0:RAID.Slot.1-1 |
| 741 | expand_capacity_disk: Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 742 | ``` |
| 743 | |
| 744 | ``` |
| 745 | - name: Blink virtual drive. |
| 746 | ansible.builtin.include_role: |
| 747 | name: idrac_storage_controller |
| 748 | vars: |
| 749 | hostname: 192.168.0.1 |
| 750 | username: username |
| 751 | password: password |
| 752 | ca_path: "/path/to/ca_cert.pem" |
| 753 | controller_id: RAID.Slot.1-1 |
| 754 | volumes: |
| 755 | id: Disk.Virtual.0:RAID.Slot.1-1 |
| 756 | blink: true |
| 757 | ``` |
| 758 | |
| 759 | ``` |
| 760 | - name: Unblink virtual drive. |
| 761 | ansible.builtin.include_role: |
| 762 | name: idrac_storage_controller |
| 763 | vars: |
| 764 | hostname: 192.168.0.1 |
| 765 | username: username |
| 766 | password: password |
| 767 | ca_path: "/path/to/ca_cert.pem" |
| 768 | controller_id: RAID.Slot.1-1 |
| 769 | volumes: |
| 770 | id: Disk.Virtual.0:RAID.Slot.1-1 |
| 771 | blink: false |
| 772 | ``` |
| 773 | |
| 774 | ``` |
| 775 | - name: Blink physical disk. |
| 776 | ansible.builtin.include_role: |
| 777 | name: idrac_storage_controller |
| 778 | vars: |
| 779 | hostname: 192.168.0.1 |
| 780 | username: username |
| 781 | password: password |
| 782 | ca_path: "/path/to/ca_cert.pem" |
| 783 | controller_id: RAID.Slot.1-1 |
| 784 | disks: |
| 785 | id: Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 786 | blink: true |
| 787 | ``` |
| 788 | |
| 789 | ``` |
| 790 | - name: Unblink physical disk. |
| 791 | ansible.builtin.include_role: |
| 792 | name: idrac_storage_controller |
| 793 | vars: |
| 794 | hostname: 192.168.0.1 |
| 795 | username: username |
| 796 | password: password |
| 797 | ca_path: "/path/to/ca_cert.pem" |
| 798 | controller_id: RAID.Slot.1-1 |
| 799 | disks: |
| 800 | id: Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 801 | blink: false |
| 802 | ``` |
| 803 | |
| 804 | ``` |
| 805 | - name: Multiple operations on controller. |
| 806 | ansible.builtin.include_role: |
| 807 | name: idrac_storage_controller |
| 808 | vars: |
| 809 | hostname: 192.168.0.1 |
| 810 | username: username |
| 811 | password: password |
| 812 | validate_certs: false |
| 813 | controller_id: RAID.Slot.1-1 |
| 814 | disks: |
| 815 | id: Disk.Bay.3:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 816 | global_hot_spare: false |
| 817 | set_controller_key: true |
| 818 | key: PassPhrase@12341 |
| 819 | key_id: mykeyid123 |
| 820 | mode: LKM |
| 821 | attributes: |
| 822 | CheckConsistencyMode: StopOnError |
| 823 | CopybackMode: OnWithSMART |
| 824 | apply_time: Immediate |
| 825 | ``` |
| 826 | |
| 827 | ``` |
| 828 | - name: Perform secure erase on physical disk. |
| 829 | ansible.builtin.include_role: |
| 830 | name: idrac_storage_controller |
| 831 | vars: |
| 832 | hostname: 192.168.0.1 |
| 833 | username: username |
| 834 | password: password |
| 835 | validate_certs: false |
| 836 | controller_id: RAID.Slot.1-1 |
| 837 | disks: |
| 838 | id: Disk.Bay.3:Enclosure.Internal.0-1:RAID.Slot.1-1 |
| 839 | erase: true |
| 840 | ``` |
| 841 | |
| 842 | ## Author Information |
| 843 | ------------------ |
| 844 | |
| 845 | Dell Technologies <br> |
| 846 | Felix Stephen Anthuvan ([email protected]) 2023 <br> |
| 847 | Abhishek Sinha |
| 848 | ([email protected]) 2024 |