cisco.intersight.intersight_storage_policy module – Storage Policy configuration for Cisco Intersight
Note
This module is part of the cisco.intersight collection (version 2.18.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 |
|---|---|
api_key_id string / required | Public API Key ID associated with the private key. If not set, the value of the INTERSIGHT_API_KEY_ID environment variable is used. |
api_private_key path / required | 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. |
api_uri string | URI used to access the Intersight API. If not set, the value of the INTERSIGHT_API_URI environment variable is used. Default: |
controller_attached_nvme_slots string | 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” |
default_drive_mode string | 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:
|
description aliases: descr string | 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(_). |
direct_attached_nvme_slots string | 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” |
drive_groups list / elements=dictionary | 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. |
|
dedicated_hot_spares string |
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” |
|
name string / required |
The name of the drive group. The name can be between 1 and 64 alphanumeric characters. |
|
raid_level string |
The supported RAID level for the disk group. Choices:
|
|
secure_drive_group boolean |
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:
|
|
span_groups list / elements=dictionary / required |
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. |
|
slots string / required |
Drive slots for this span group. Slot format examples: “1,4,5”, “2”, “1-5”, “1,2,6-8” |
|
state string |
Whether to create/update or delete the drive group. Choices:
|
|
virtual_drives list / elements=dictionary |
List of virtual drives to be created in this drive group. |
|
access_policy string |
Access policy that host has on this virtual drive. Choices:
|
|
boot_drive boolean |
Whether this virtual drive is a boot drive. Choices:
|
|
disk_cache string |
Disk cache policy for the virtual drive. Choices:
|
|
expand_to_available boolean |
Whether to expand the virtual drive to use all available space. Choices:
|
|
name string / required |
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_policy string |
Read ahead mode to be used to read data from this virtual drive. Choices:
|
|
size integer |
Virtual drive size in MebiBytes. Size is mandatory field except when the Expand to Available option is enabled. |
|
strip_size integer |
Desired strip size in KiB. Choices:
|
|
write_policy string |
Write mode to be used to write data to this virtual drive. Choices:
|
m2_virtual_drive_config dictionary | M.2 RAID virtual drive configuration. |
|
controller_slot string |
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 boolean |
Enable M.2 virtual drive configuration. Choices:
|
|
name string |
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: |
name string / required | The name assigned to the Storage Policy. The name must be between 1 and 62 alphanumeric characters, allowing special characters :-_. |
organization string | 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: |
raid0_drive_config dictionary | MRAID/RAID Single Drive RAID0 Configuration. |
|
access_policy string |
Access policy that host has on this virtual drive. Choices:
|
|
disk_cache string |
Disk cache policy for the virtual drive. Choices:
|
|
drive_slots string |
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 boolean |
Enable RAID0 drive configuration. Choices:
|
|
read_policy string |
Read ahead mode to be used to read data from this virtual drive. Choices:
|
|
strip_size integer |
Desired strip size in KiB. Choices:
|
|
write_policy string |
Write mode to be used to write data to this virtual drive. Choices:
|
secure_jbods string | 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” |
state string | If If Choices:
|
tags list / elements=dictionary | List of tags in Key:<user-defined key> Value:<user-defined value> format. Default: |
unused_disks_state string | 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:
|
use_jbod_for_vd_creation boolean | Disks in JBOD State are used to create virtual drives. This setting must be disabled if Default Drive State is set to JBOD. Choices:
|
use_proxy boolean | If Choices:
|
validate_certs boolean | 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"
m2_virtual_drive_config:
enable: false
raid0_drive_config:
enable: false
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"
raid0_drive_config:
enable: false
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"
m2_virtual_drive_config:
enable: false
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 |
|---|---|
api_response dictionary | The API response output returned by the specified resource. Returned: always Sample: |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/cisco/intersight/intersight_storage_policy_module.html