dellemc.openmanage.idrac_redfish_storage_controller module – Configures the physical disk, virtual disk, and storage controller settings
Note
This module is part of the dellemc.openmanage collection (version 10.0.1).
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_redfish_storage_controller.
New in dellemc.openmanage 2.1.0
Synopsis
- This module allows the users to configure the settings of the physical disk, virtual disk, and storage controller. 
Requirements
The below requirements are needed on the host that executes this module.
- python >= 3.9.6 
Parameters
| Parameter | Comments | 
|---|---|
| Apply time of the attributes. This is applicable only to attributes. 
 
 
 
 Only  Choices: 
 | |
| Dictionary of controller attributes and value pair. This feature is only supported for iDRAC9 with firmware version 6.00.00.00 and above controller_id is required for this operation. apply_time and maintenance_window is applicable for attributes. attributes is mutually exclusive with command. Use https://I(idrac_ip/redfish/v1/Schemas/DellOemStorageController.json) to view the attributes. 
 | |
| IP address of the target out-of-band controller. For example- <ipaddress>:<port>. | |
| The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. | |
| These actions may require a system reset, depending on the capabilities of the controller. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 Blinking of virtual disk is not supported for 17G and above. Choices: 
 | |
| Fully Qualified Device Descriptor (FQDD) of the storage controller. For example-’RAID.Slot.1-1’. This option is mandatory when command is  This option is mandatory for attributes. | |
| Provides the option if the module has to wait for the job to be completed. This is applicable for attributes when apply_time is  Choices: 
 | |
| The maximum wait time of job completion in seconds before the job tracking is stopped. This option is applicable when job_wait is  Note: When command is  Default:  | |
| 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. This is mandatory when command is  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. The key must contain at least one character from each of the character classes: uppercase, lowercase, number, and special character. | |
| This is a user supplied text label associated with the passphrase. This is mandatory when command is  The length of key_id can be a maximum of 32 characters in length and should not have any spaces. | |
| Option to schedule the maintenance window. This is required when apply_time is  | |
| The duration in seconds for the maintenance window. Default:  | |
| The start time for the maintenance window to be scheduled. The format is YYYY-MM-DDThh:mm:ss<offset> <offset> is the time offset from UTC that the current timezone set in iDRAC in the format: +05:30 for IST. | |
| Encryption mode of the encryption capable controller. This option is applicable only when command is  
 
 Choices: 
 | |
| Security key passphrase used by the encryption-capable controller. This option is mandatory when command is  | |
| Password of the target out-of-band controller. If the password is not provided, then the environment variable  Example: export IDRAC_PASSWORD=password | |
| Capacity of the virtual disk to be expanded in MB. Check mode and Idempotency is not supported for size. Minimum Online Capacity Expansion size must be greater than 100 MB of the current size. When command is  | |
| Fully Qualified Device Descriptor (FQDD) of the target physical drive. This is mandatory when command is  If volume_id is not specified or empty, this physical drive will be assigned as a global hot spare when command is  When command is  Notes: Global or Dedicated hot spare can be assigned only once for a physical disk, Re-assign cannot be done when command is  | |
| The socket level timeout in seconds. Default:  | |
| Username of the target out-of-band controller. If the username is not provided, then the environment variable  Example: export IDRAC_USERNAME=username | |
| If  Configure  Prior to collection version  Choices: 
 | |
| Fully Qualified Device Descriptor (FQDD) of the volume. Applicable if command is  volume_id or target is required when the command is  To know the number of volumes to which a hot spare can be assigned, refer iDRAC Redfish API documentation. | |
| Authentication token. If the x_auth_token is not provided, then the environment variable  Example: export IDRAC_X_AUTH_TOKEN=x_auth_token | 
Notes
Note
- Run this module from a system that has direct access to Dell iDRAC. 
- This module is supported on iDRAC9 and iDRAC 10. 
- This module supports IPv4 and IPv6 addresses. 
- This module always reports as changes found when command is - ReKey,- BlinkTarget, and- UnBlinkTarget.
- This module supports - check_mode.
Examples
---
- name: Assign dedicated hot spare
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    volume_id:
      - "Disk.Virtual.0:RAID.Slot.1-1"
    target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
  tags:
    - assign_dedicated_hot_spare
- name: Assign global hot spare
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
  tags:
    - assign_global_hot_spare
- name: Unassign hot spare
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
    command: UnassignSpare
  tags:
    - un-assign-hot-spare
- name: Set controller encryption key
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: "SetControllerKey"
    controller_id: "RAID.Slot.1-1"
    key: "PassPhrase@123"
    key_id: "mykeyid123"
  tags:
    - set_controller_key
- name: Rekey in LKM mode
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: "ReKey"
    controller_id: "RAID.Slot.1-1"
    key: "NewPassPhrase@123"
    key_id: "newkeyid123"
    old_key: "OldPassPhrase@123"
  tags:
    - rekey_lkm
- name: Rekey in SEKM mode
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: "ReKey"
    controller_id: "RAID.Slot.1-1"
    mode: "SEKM"
  tags:
    - rekey_sekm
- name: Remove controller key
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: "RemoveControllerKey"
    controller_id: "RAID.Slot.1-1"
  tags:
    - remove_controller_key
- name: Reset controller configuration
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: "ResetConfig"
    controller_id: "RAID.Slot.1-1"
  tags:
    - reset_config
- name: Enable controller encryption
  idrac_redfish_storage_controller:
    baseuri: "{{ baseuri }}"
    username: "{{ username }}"
    password: "{{ password }}"
    ca_path: "/path/to/ca_cert.pem"
    command: "EnableControllerEncryption"
    controller_id: "RAID.Slot.1-1"
    mode: "LKM"
    key: "your_Key@123"
    key_id: "your_Keyid@123"
  tags:
    - enable-encrypt
- name: Blink physical disk.
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: BlinkTarget
    target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
  tags:
    - blink-target
- name: Blink virtual drive.
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: BlinkTarget
    volume_id: "Disk.Virtual.0:RAID.Slot.1-1"
  tags:
    - blink-volume
- name: Unblink physical disk.
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: UnBlinkTarget
    target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
  tags:
    - unblink-target
- name: Unblink virtual drive.
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: UnBlinkTarget
    volume_id: "Disk.Virtual.0:RAID.Slot.1-1"
  tags:
    - unblink-drive
- name: Convert physical disk to RAID
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: "ConvertToRAID"
    target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
  tags:
    - convert-raid
- name: Convert physical disk to non-RAID
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: "ConvertToNonRAID"
    target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1"
  tags:
    - convert-non-raid
- name: Change physical disk state to online.
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: "ChangePDStateToOnline"
    target: "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1"
  tags:
    - pd-state-online
- name: Change physical disk state to offline.
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: "ChangePDStateToOnline"
    target: "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1"
  tags:
    - pd-state-offline
- name: Lock virtual drive
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    command: "LockVirtualDisk"
    volume_id: "Disk.Virtual.0:RAID.SL.3-1"
  tags:
    - lock
- name: Online Capacity Expansion of a volume using target
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "{{ baseuri }}"
    username: "{{ username }}"
    password: "{{ password }}"
    ca_path: "/path/to/ca_cert.pem"
    command: "OnlineCapacityExpansion"
    volume_id: "Disk.Virtual.0:RAID.Integrated.1-1"
    target:
      - "Disk.Bay.2:Enclosure.Internal.0-0:RAID.Integrated.1-1"
  tags:
    - oce_target
- name: Online Capacity Expansion of a volume using size
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "{{ baseuri }}"
    username: "{{ username }}"
    password: "{{ password }}"
    ca_path: "/path/to/ca_cert.pem"
    command: "OnlineCapacityExpansion"
    volume_id: "Disk.Virtual.0:RAID.Integrated.1-1"
    size: 362785
  tags:
    - oce_size
- name: Set controller attributes.
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    controller_id: "RAID.Slot.1-1"
    attributes:
      ControllerMode: "HBA"
    apply_time: "OnReset"
  tags:
    - controller-attribute
- name: Configure controller attributes at Maintenance window
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    controller_id: "RAID.Slot.1-1"
    attributes:
      CheckConsistencyMode: Normal
      CopybackMode: "Off"
      LoadBalanceMode: Disabled
    apply_time: AtMaintenanceWindowStart
    maintenance_window:
      start_time: "2022-09-30T05:15:40-05:00"
      duration: 1200
- name: Perform Secure Erase operation on SED drive
  dellemc.openmanage.idrac_redfish_storage_controller:
    baseuri: "192.168.0.1:443"
    username: "user_name"
    password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    controller_id: "RAID.Slot.1-1"
    command: "SecureErase"
    target: "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1"
Return Values
Common return values are documented here, the following are the fields unique to this module:
| Key | Description | 
|---|---|
| Details of a http error. Returned: on http error Sample:  | |
| Overall status of the storage controller configuration operation. Returned: always Sample:  | |
| status of the submitted job. Returned: always Sample:  | |
| ID and URI resource of the job created. Returned: success Sample:  | 
