dellemc.openmanage.idrac_redfish_storage_controller 模块 – 配置物理磁盘、虚拟磁盘和存储控制器设置
注意
此模块是 dellemc.openmanage 集合(版本 9.9.0)的一部分。
如果您正在使用 ansible 包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install dellemc.openmanage。您需要进一步的要求才能使用此模块,有关详细信息,请参阅要求。
要在 playbook 中使用它,请指定:dellemc.openmanage.idrac_redfish_storage_controller。
dellemc.openmanage 2.1.0 中的新增功能
概要
- 此模块允许用户配置物理磁盘、虚拟磁盘和存储控制器的设置。 
要求
以下要求需要在执行此模块的主机上满足。
- python >= 3.9.6 
参数
| 参数 | 注释 | 
|---|---|
| attributes 的应用时间。 这仅适用于 attributes。 
 
 
 
 选项 
 | |
| 控制器属性和值对的字典。 此功能仅支持固件版本为 6.00.00.00 及更高版本的 iDRAC9 此操作需要 controller_id。 apply_time 和 maintenance_window 适用于 attributes。 attributes 与 command 互斥。 使用 https://I(idrac_ip/redfish/v1/Schemas/DellOemStorageController.json) 查看属性。 | |
| 目标带外控制器的 IP 地址。例如- <ipaddress>:<port>。 | |
| 包含用于验证的 CA 证书的隐私增强邮件 (PEM) 文件。 | |
| 这些操作可能需要系统重置,具体取决于控制器的功能。 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 选项 
 | |
| 存储控制器的完全限定设备描述符 (FQDD)。例如:‘RAID.Slot.1-1’。 当command为 此选项对于attributes是必需的。 | |
| 提供模块是否需要等待作业完成的选项。 当apply_time为 选项 
 | |
| 作业跟踪停止前,作业完成的最长等待时间(以秒为单位)。 当job_wait为 注意:当command为 默认值:  | |
| 加密控制器用来创建加密密钥的新安全密钥密码。控制器使用加密密钥来锁定或解锁对自加密驱动器 (SED) 的访问。每个控制器只能创建一个加密密钥。 当command为 密钥的长度最多为 32 个字符,其中特殊字符的扩展形式计为一个字符。 密钥必须至少包含来自以下每个字符类的一个字符:大写字母、小写字母、数字和特殊字符。 | |
| 这是与密码关联的用户提供的文本标签。 当command为 key_id 的长度最多为 32 个字符,并且不应包含任何空格。 | |
| 用于计划维护窗口的选项。 当apply_time为 | |
| 维护窗口的持续时间(以秒为单位)。 默认值:  | |
| 要计划的维护窗口的开始时间。 格式为 YYYY-MM-DDThh:mm:ss<offset> <offset>是当前时区在iDRAC中设置的UTC的时间偏移量,格式为:+05:30(IST)。 | |
| 支持加密的控制器的加密模式。 此选项仅在command为 
 
 选项 
 | |
| 支持加密的控制器使用的安全密钥密码。 当command为 | |
| 目标带外控制器的密码。 如果未提供密码,则使用环境变量  示例:export IDRAC_PASSWORD=password | |
| 要扩展的虚拟磁盘容量(以MB为单位)。 不支持对size进行检查模式和幂等性。 最小在线容量扩展大小必须大于当前大小的 100 MB。 当command为 | |
| 目标物理驱动器的完全限定设备描述符 (FQDD)。 当command为 如果未指定或为空volume_id,则当command为 当command为 注意:全局或专用热备盘对于物理磁盘只能分配一次,当command为 | |
| 套接字级别超时(以秒为单位)。 默认值:  | |
| 目标带外控制器的用户名。 如果未提供用户名,则使用环境变量  示例:export IDRAC_USERNAME=username | |
| 如果 仅在个人控制的站点(使用自签名证书)上配置 在集合版本  选项 
 | |
| 卷的完全限定设备描述符 (FQDD)。 如果command为 当command为 要了解可以将热备盘分配到的卷数,请参阅 iDRAC Redfish API 文档。 | |
| 身份验证令牌。 如果未提供 x_auth_token,则使用环境变量  示例:export IDRAC_X_AUTH_TOKEN=x_auth_token | 
注意
注意
- 从可以直接访问 Dell iDRAC 的系统运行此模块。 
- 此模块在 iDRAC9 上受支持。 
- 此模块支持 IPv4 和 IPv6 地址。 
- 当command为 - ReKey、- BlinkTarget和- UnBlinkTarget时,此模块始终报告为找到更改。
- 此模块支持 - check_mode。
示例
---
- 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"
返回值
此处记录了常用返回值:此处,以下是此模块独有的字段
| 密钥 | 描述 | 
|---|---|
| http 错误的详细信息。 返回:发生 http 错误时 示例:  | |
| 存储控制器配置操作的总体状态。 返回: 始终 示例:  | |
| 已提交作业的状态。 返回: 始终 示例:  | |
| 创建的作业的 ID 和 URI 资源。 返回: 成功 示例:  | 
