cisco.intersight.intersight_storage_policy module – Storage Policy configuration for Cisco Intersight
Note
This module is part of the cisco.intersight collection (version 2.3.0).
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 cisco.intersight
.
To use it in a playbook, specify: cisco.intersight.intersight_storage_policy
.
Synopsis
Manages Storage Policy configuration on Cisco Intersight.
A policy to configure storage settings and virtual drive configurations for Cisco Intersight managed servers.
For more information see Cisco Intersight.
Parameters
Parameter |
Comments |
---|---|
Public API Key ID associated with the private key. If not set, the value of the INTERSIGHT_API_KEY_ID environment variable is used. |
|
Filename (absolute path) or string of PEM formatted private key data to be used for Intersight API authentication. If a string is used, Ansible vault should be used to encrypt string data. Ex. ansible-vault encrypt_string –vault-id tme@/Users/dsoper/Documents/vault_password_file ‘—–BEGIN EC PRIVATE KEY—– <your private key data> —–END EC PRIVATE KEY—–’ If not set, the value of the INTERSIGHT_API_PRIVATE_KEY environment variable is used. |
|
URI used to access the Intersight API. If not set, the value of the INTERSIGHT_API_URI environment variable is used. Default: |
|
Only U.3 NVMe drives need to be specified, entered slots will be moved to controller attached mode. Allowed slots are 1-9, 21-24, 101-104. Allowed value is a comma or hyphen separated number ranges. Slot format examples: “1,4,5”, “2”, “1-5”, “1,2,6-8” |
|
All unconfigured drives will move to the selected state on deployment. Newly inserted drives will move to the selected state. Select UnconfiguredGood option to retain the existing configuration. Select Jbod to move the unconfigured drives to JBOD state. Select RAID0 to create a RAID0 virtual drive on each of the unconfigured drives. Choices:
|
|
The user-defined description for the Storage Policy. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_). |
|
Only U.3 NVMe drives need to be specified, entered slots will be moved to Direct attached mode. Allowed slots are 1-9, 21-24, 101-104. Allowed value is a comma or hyphen separated number ranges. Slot format examples: “1,4,5”, “2”, “1-5”, “1,2,6-8” |
|
List of drive groups to be created and attached to the storage policy. Each drive group can contain multiple virtual drives. Leave empty to create a policy without drive groups for manual configuration later. |
|
A collection of drives to be used as hot spares for this Drive Group. Not applicable for RAID0. Slot format examples: “1,4,5”, “2”, “1-5”, “1,2,6-8” |
|
The name of the drive group. The name can be between 1 and 64 alphanumeric characters. |
|
The supported RAID level for the disk group. Choices:
|
|
Enables/disables the drive security on all the drives used in this policy. This flag just enables the drive security and only after Remote/Manual key setting configured, the actual security will be applied. Choices:
|
|
List of span groups for the drive group. Each span group contains drive slots. Required field - must be provided for all drive groups. Single span group for RAID0, RAID1, RAID5, RAID6. Multiple span groups (2-8) for RAID10, RAID50, RAID60. |
|
Drive slots for this span group. Slot format examples: “1,4,5”, “2”, “1-5”, “1,2,6-8” |
|
Whether to create/update or delete the drive group. Choices:
|
|
List of virtual drives to be created in this drive group. |
|
Access policy that host has on this virtual drive. Choices:
|
|
Whether this virtual drive is a boot drive. Choices:
|
|
Disk cache policy for the virtual drive. Choices:
|
|
Whether to expand the virtual drive to use all available space. Choices:
|
|
The name of the virtual drive. The name can be between 1 and 15 alphanumeric characters. Spaces or any special characters other than - (hyphen) and _ (underscore) are not allowed. |
|
Read ahead mode to be used to read data from this virtual drive. Choices:
|
|
Virtual drive size in MebiBytes. Size is mandatory field except when the Expand to Available option is enabled. |
|
Desired strip size in KiB. Choices:
|
|
Write mode to be used to write data to this virtual drive. Choices:
|
|
M.2 RAID virtual drive configuration. |
|
Slot of the M.2 RAID controller for virtual drive creation. Select ‘MSTOR-RAID-1’ to create virtual drive on the M.2 RAID controller in the first slot. Select ‘MSTOR-RAID-2’ for second slot. Select ‘MSTOR-RAID-1,MSTOR-RAID-2’ for both slots or either slot. Choices:
|
|
Enable M.2 virtual drive configuration. Choices:
|
|
The name of the virtual drive. The name can be between 1 and 15 alphanumeric characters. Spaces or any special characters other than - (hyphen) and _ (underscore) are not allowed. Default: |
|
The name assigned to the Storage Policy. The name must be between 1 and 62 alphanumeric characters, allowing special characters :-_. |
|
The name of the Organization this resource is assigned to. Profiles, Policies, and Pools that are created within a Custom Organization are applicable only to devices in the same Organization. Default: |
|
MRAID/RAID Single Drive RAID0 Configuration. |
|
Access policy that host has on this virtual drive. Choices:
|
|
Disk cache policy for the virtual drive. Choices:
|
|
The set of drive slots where RAID0 virtual drives must be created. If not specified, it will not be added. Slot format examples: “1,4,5”, “2”, “1-5”, “1,2,6-8” |
|
Enable RAID0 drive configuration. Choices:
|
|
Read ahead mode to be used to read data from this virtual drive. Choices:
|
|
Desired strip size in KiB. Choices:
|
|
Write mode to be used to write data to this virtual drive. Choices:
|
|
JBOD drives specified in this slot range will be encrypted. Allowed values are ‘ALL’, or a comma or hyphen separated number range. Sample format is ALL or 1, 3 or 4-6, 8. Setting the value to ‘ALL’ will encrypt all the unused UnconfigureGood/JBOD disks. Slot format examples: “1,4,5”, “2”, “1-5”, “1,2,6-8” |
|
If If Choices:
|
|
List of tags in Key:<user-defined key> Value:<user-defined value> format. Default: |
|
State to which drives, not used in this policy, are to be moved. NoChange will not change the drive state. No Change must be selected if Default Drive State is set to JBOD or RAID0. Choices:
|
|
Disks in JBOD State are used to create virtual drives. This setting must be disabled if Default Drive State is set to JBOD. Choices:
|
|
If Choices:
|
|
Boolean control for verifying the api_uri TLS certificate Choices:
|
Examples
- name: Create a basic storage policy
cisco.intersight.intersight_storage_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "basic-storage-policy"
description: "Basic storage policy configuration"
tags:
- Key: "Environment"
Value: "Production"
- name: Create storage policy with M.2 virtual drive enabled
cisco.intersight.intersight_storage_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "m2-enabled-storage-policy"
description: "Storage policy with M.2 virtual drive"
m2_virtual_drive_config:
enable: true
controller_slot: "MSTOR-RAID-1"
name: "MStorBootVd"
tags:
- Key: "Site"
Value: "Datacenter1"
- name: Create storage policy with RAID0 configuration
cisco.intersight.intersight_storage_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "raid0-storage-policy"
description: "Storage policy with RAID0 configuration"
use_jbod_for_vd_creation: true
default_drive_mode: "RAID0"
secure_jbods: "1"
raid0_drive_config:
enable: true
strip_size: 128
access_policy: "ReadWrite"
read_policy: "ReadAhead"
write_policy: "WriteBackGoodBbu"
disk_cache: "Enable"
controller_attached_nvme_slots: "2"
direct_attached_nvme_slots: "3"
- name: Create storage policy with drive groups
cisco.intersight.intersight_storage_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "drive-group-storage-policy"
description: "Storage policy with drive groups"
m2_virtual_drive_config:
enable: false
raid0_drive_config:
enable: false
drive_groups:
- name: "raid0-group"
raid_level: "Raid0"
secure_drive_group: false
span_groups:
- slots: "1,2"
virtual_drives:
- name: "raid0-vd"
size: 1024
expand_to_available: false
boot_drive: true
strip_size: 128
access_policy: "ReadWrite"
read_policy: "ReadAhead"
write_policy: "WriteBackGoodBbu"
disk_cache: "Enable"
- name: "raid1-group"
raid_level: "Raid1"
secure_drive_group: true
dedicated_hot_spares: "3,4"
span_groups:
- slots: "5,6"
virtual_drives:
- name: "raid1-vd"
size: 0
expand_to_available: true
boot_drive: false
strip_size: 64
access_policy: "Default"
read_policy: "Default"
write_policy: "Default"
disk_cache: "Default"
- name: Create storage policy with nested RAID drive groups
cisco.intersight.intersight_storage_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "nested-raid-storage-policy"
description: "Storage policy with nested RAID configurations"
m2_virtual_drive_config:
enable: false
raid0_drive_config:
enable: false
drive_groups:
- name: "raid60-group"
raid_level: "Raid60"
secure_drive_group: false
dedicated_hot_spares: "33,34,35,36"
span_groups:
- slots: "1,2,3,4"
- slots: "5,6,7,8"
- slots: "9,10,11,12"
- slots: "13,14,15,16"
- slots: "17,18,19,20"
- slots: "21,22,23,24"
- slots: "25,26,27,28"
- slots: "29,30,31,32"
virtual_drives:
- name: "raid60-vd1"
size: 1024
expand_to_available: false
boot_drive: true
strip_size: 64
access_policy: "ReadWrite"
read_policy: "Default"
write_policy: "Default"
disk_cache: "Default"
- name: "raid60-vd2"
size: 1024
expand_to_available: false
boot_drive: false
strip_size: 64
access_policy: "ReadWrite"
read_policy: "Default"
write_policy: "Default"
disk_cache: "Default"
- name: Delete a storage policy
cisco.intersight.intersight_storage_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "old-storage-policy"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The API response output returned by the specified resource. Returned: always Sample: |