cisco.intersight.intersight_vsan_policy module – Manage VSAN Policies and VSANs for Cisco Intersight
Note
This module is part of the cisco.intersight collection (version 2.6.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_vsan_policy
.
Synopsis
Create, update, and delete VSAN (Virtual Storage Area Network) Policies on Cisco Intersight.
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: |
|
The user-defined description for the VSAN Policy. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_). |
|
Enable or disable VSAN trunking on the policy. When enabled, allows multiple VSANs to be carried over a single physical link. Choices:
|
|
The name assigned to the VSAN Policy. Must be unique within the organization. The name must be between 1 and 62 alphanumeric characters, allowing special characters :-_. |
|
The name of the Organization this resource is assigned to. Policies created within a Custom Organization are applicable only to devices in the same Organization. Use ‘default’ for the default organization. Default: |
|
If If Choices:
|
|
List of tags in Key:<user-defined key> Value:<user-defined value> format. |
|
If Choices:
|
|
Boolean control for verifying the api_uri TLS certificate Choices:
|
|
List of VSANs to be created and attached to the VSAN policy. Each VSAN represents a virtual SAN segment. Leave empty to create a policy without VSANs for manual configuration later. |
|
FCoE VLAN ID associated with the VSAN configuration. Must be between 2 and 4093. VLAN IDs from 4043-4047, 4094, and 4095 are reserved for system use. Required when state is present. |
|
User-defined name for the VSAN configuration. Must be unique within the VSAN policy. |
|
Whether to create/update or delete the VSAN. Choices:
|
|
Virtual SAN Identifier in the switch. Valid range is typically 1-4094. Must be unique within the fabric interconnect domain. Required when state is present. |
|
Indicates whether the VSAN ID is defined for storage or uplink or both traffics in FI. Required when state is present. Choices:
|
Examples
- name: Create a VSAN Policy with multiple VSANs
cisco.intersight.intersight_vsan_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "datacenter-vsan-policy"
description: "VSAN policy for datacenter SAN infrastructure"
enable_trunking: false
tags:
- Key: "Environment"
Value: "Production"
- Key: "Site"
Value: "DataCenter-A"
vsans:
- name: "vsan_uplink_100"
vsan_id: 100
fcoe_vlan_id: 100
vsan_scope: "uplink"
- name: "vsan_storage_200"
vsan_id: 200
fcoe_vlan_id: 200
vsan_scope: "storage"
- name: "vsan_common_300"
vsan_id: 300
fcoe_vlan_id: 300
vsan_scope: "common"
state: present
- name: Create a VSAN Policy with trunking enabled
cisco.intersight.intersight_vsan_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "trunked-vsan-policy"
description: "VSAN policy with trunking enabled"
enable_trunking: true
vsans:
- name: "vsan_fabric_a"
vsan_id: 10
fcoe_vlan_id: 10
vsan_scope: "common"
- name: "vsan_fabric_b"
vsan_id: 20
fcoe_vlan_id: 20
vsan_scope: "common"
state: present
- name: Create a VSAN Policy without VSANs (for manual configuration)
cisco.intersight.intersight_vsan_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "Engineering"
name: "empty-vsan-policy"
description: "Empty policy for manual VSAN configuration"
enable_trunking: false
state: present
- name: Update an existing VSAN Policy
cisco.intersight.intersight_vsan_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "datacenter-vsan-policy"
description: "Updated description for datacenter SAN infrastructure"
enable_trunking: true
tags:
- Key: "Environment"
Value: "Production"
- Key: "Site"
Value: "DataCenter-A"
- Key: "Updated"
Value: "2024-01-01"
state: present
- name: Delete a VSAN from a policy
cisco.intersight.intersight_vsan_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "datacenter-vsan-policy"
vsans:
- name: "vsan_uplink_100"
vsan_id: 100
fcoe_vlan_id: 100
vsan_scope: "uplink"
- name: "vsan_storage_200"
vsan_id: 200
fcoe_vlan_id: 200
vsan_scope: "storage"
state: absent
state: present
- name: Delete a VSAN Policy
cisco.intersight.intersight_vsan_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "datacenter-vsan-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: |