cisco.intersight.intersight_iscsi_static_target_policy module – Manage iSCSI Static Target Policies 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_iscsi_static_target_policy
.
Synopsis
Create, update, and delete iSCSI Static Target Policies on Cisco Intersight.
iSCSI static target policy enables you to configure the iSCSI targets for iSCSI vNIC interfaces.
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 iSCSI Static Target Policy. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_). |
|
Type of the IP address requested for iSCSI vNIC. IPv4 or IPv6. Required when state is present. Choices:
|
|
The IPv4 address assigned to the iSCSI target. Required when ip_protocol is IPv4 and state is present. |
|
The IPv6 address assigned to the iSCSI target. Required when ip_protocol is IPv6 and state is present. |
|
The Logical Unit Number (LUN) Identifier for the iSCSI target. Valid values are 0 or greater (typically 0-255). Required when state is present. |
|
The name assigned to the iSCSI Static Target 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: |
|
The port associated with the iSCSI target. Valid range is 1-65535. Common iSCSI port is 3260. Required when state is present. |
|
If If Choices:
|
|
List of tags in Key:<user-defined key> Value:<user-defined value> format. |
|
Qualified Name (IQN) or Extended Unique Identifier (EUI) name of the iSCSI target. This is the name that uniquely identifies the target in the iSCSI network. Example IQN format - iqn.1991-05.com.microsoft:winclient1 Example EUI format - eui.02004567A425678D Required when state is present. |
|
If Choices:
|
|
Boolean control for verifying the api_uri TLS certificate Choices:
|
Examples
- name: Create an iSCSI Static Target Policy with IPv4
cisco.intersight.intersight_iscsi_static_target_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "iscsi-static-target-policy-01"
description: "iSCSI static target policy for production servers"
target_name: "iqn.1991-05.com.microsoft:winclient1"
port: 3260
lun_id: 0
ip_protocol: "IPv4"
ipv4_address: "192.168.10.100"
tags:
- Key: "Environment"
Value: "Production"
- Key: "Owner"
Value: "Storage-Team"
state: present
- name: Create an iSCSI Static Target Policy with IPv6
cisco.intersight.intersight_iscsi_static_target_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "iscsi-static-target-policy-ipv6"
description: "iSCSI static target policy with IPv6 addressing"
target_name: "iqn.2001-04.com.example:storage.disk2"
port: 3260
lun_id: 1
ip_protocol: "IPv6"
ipv6_address: "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
state: present
- name: Update an existing iSCSI Static Target Policy
cisco.intersight.intersight_iscsi_static_target_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "iscsi-static-target-policy-01"
description: "Updated description for iSCSI target policy"
target_name: "iqn.1991-05.com.microsoft:winclient1"
port: 3260
lun_id: 2
ip_protocol: "IPv4"
ipv4_address: "192.168.10.101"
state: present
- name: Delete an iSCSI Static Target Policy
cisco.intersight.intersight_iscsi_static_target_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "iscsi-static-target-policy-01"
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: |