cisco.intersight.intersight_iscsi_boot_policy module – Manage iSCSI Boot Policies for Cisco Intersight
Note
This module is part of the cisco.intersight collection (version 2.7.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_boot_policy.
Synopsis
Create, update, and delete iSCSI Boot Policies on Cisco Intersight.
iSCSI boot policies define how servers boot from iSCSI targets using IPv4 or IPv6 protocols.
Supports automatic target discovery (Auto) and manual configuration (Static) with DHCP, Pool, or Static IP sources.
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: |
|
Auto target interface that is represented via the Initiator name or the DHCP vendor ID. The vendor ID can be up to 64 characters. Required when target_source_type is auto and iscsi_ip_type is ipv4. |
|
CHAP authentication parameters for iSCSI Target. Provide user_id and password to enable CHAP authentication. Leave empty or omit to disable CHAP authentication. |
|
CHAP password for authentication. |
|
CHAP username for authentication. |
|
The user-defined description for the iSCSI Boot Policy. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_). |
|
Name of the IP pool to use for initiator IP address assignment. Required when initiator_ip_source is pool. |
|
Method for assigning initiator IP address. dhcp - Obtain IP address automatically via DHCP. pool - Use an IP pool for address assignment. static - Manually configure static IP address. Choices:
|
|
Static IPv4 address provided for iSCSI Initiator. Required when initiator_ip_source is static and iscsi_ip_type is ipv4. |
|
IP address of the default IPv4 gateway. Required when initiator_ip_source is static and iscsi_ip_type is ipv4. |
|
A subnet mask is a 32-bit number that masks an IP address and divides the IP address into network address and host address. Required when initiator_ip_source is static and iscsi_ip_type is ipv4. |
|
IP Address of the primary Domain Name System (DNS) server. Optional when initiator_ip_source is static and iscsi_ip_type is ipv4. |
|
IP Address of the secondary Domain Name System (DNS) server. Optional when initiator_ip_source is static and iscsi_ip_type is ipv4. |
|
Static IPv6 address provided for iSCSI Initiator. Required when initiator_ip_source is static and iscsi_ip_type is ipv6. |
|
IP address of the default IPv6 gateway. Required when initiator_ip_source is static and iscsi_ip_type is ipv6. |
|
The integer length of the prefix that masks the IP address and divides it into network and host addresses. Required when initiator_ip_source is static and iscsi_ip_type is ipv6. |
|
Relationship to the iSCSI Adapter Policy. Name of the iSCSI adapter policy to associate with this boot policy. Optional for all configurations. |
|
Type of the IP address requested for iSCSI vNIC - IPv4/IPv6. ipv4 supports both auto and static target source types. ipv6 only supports static target source type (not auto). Both ipv4 and ipv6 support dhcp, pool, and static initiator IP sources. Choices:
|
|
Mutual CHAP authentication parameters for iSCSI Initiator. Two-way CHAP mechanism. Provide user_id and password to enable Mutual CHAP authentication. Leave empty or omit to disable Mutual CHAP authentication. |
|
Mutual CHAP password for authentication. |
|
Mutual CHAP username for authentication. |
|
The name assigned to the iSCSI Boot 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: |
|
Specifies Target Profile information for iSCSI Boot. Name of the primary iSCSI static target policy. Required when target_source_type is static. |
|
Specifies Target Profile information for iSCSI Boot. Optional when target_source_type is static. |
|
If If Choices:
|
|
List of tags in Key:<user-defined key> Value:<user-defined value> format. |
|
Target discovery method. auto - Automatic target discovery using DHCP vendor ID/IQN. static - Manual target configuration using target policies. Choices:
|
|
If Choices:
|
|
Boolean control for verifying the api_uri TLS certificate Choices:
|
Examples
- name: Create iSCSI Boot Policy with Auto discovery (IPv4)
cisco.intersight.intersight_iscsi_boot_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "iscsi-boot-auto"
description: "iSCSI boot policy with auto discovery"
iscsi_ip_type: "ipv4"
target_source_type: "auto"
auto_targetvendor_name: "iqn.1991-05.com.cisco"
iscsi_adapter_policy_name: "iscsi-adapter-policy"
initiator_ip_source: "dhcp"
state: present
- name: Create iSCSI Boot Policy with Static targets and DHCP initiator (IPv4)
cisco.intersight.intersight_iscsi_boot_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "iscsi-boot-static-dhcp"
description: "iSCSI boot policy with static targets"
iscsi_ip_type: "ipv4"
target_source_type: "static"
primary_target_policy_name: "primary-target-policy"
secondary_target_policy_name: "secondary-target-policy"
chap:
user_id: "chapuser"
password: "chappassword123"
mutual_chap:
user_id: "mutualuser"
password: "mutualpassword123"
initiator_ip_source: "dhcp"
state: present
- name: Create iSCSI Boot Policy with Pool-based initiator IP
cisco.intersight.intersight_iscsi_boot_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "iscsi-boot-pool"
description: "iSCSI boot policy with IP pool"
iscsi_ip_type: "ipv4"
target_source_type: "static"
primary_target_policy_name: "primary-target-policy"
initiator_ip_source: "pool"
initiator_ip_pool_name: "iscsi-ip-pool"
state: present
- name: Create iSCSI Boot Policy with Static IPv4 configuration
cisco.intersight.intersight_iscsi_boot_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "iscsi-boot-static-ipv4"
description: "iSCSI boot policy with static IPv4"
iscsi_ip_type: "ipv4"
target_source_type: "static"
primary_target_policy_name: "primary-target-policy"
initiator_ip_source: "static"
initiator_static_ipv4_address: "192.168.1.100"
initiator_static_ipv4_netmask: "255.255.255.0"
initiator_static_ipv4_gateway: "192.168.1.1"
initiator_static_ipv4_primary_dns: "8.8.8.8"
initiator_static_ipv4_secondary_dns: "8.8.4.4"
tags:
- Key: Environment
Value: Production
state: present
- name: Create iSCSI Boot Policy with Static IPv6 configuration
cisco.intersight.intersight_iscsi_boot_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "iscsi-boot-static-ipv6"
description: "iSCSI boot policy with static IPv6"
iscsi_ip_type: "ipv6"
target_source_type: "static"
primary_target_policy_name: "primary-target-policy-ipv6"
initiator_ip_source: "static"
initiator_static_ipv6_address: "2001:db8::1"
initiator_static_ipv6_prefix: 64
initiator_static_ipv6_gateway: "2001:db8::ffff"
state: present
- name: Create iSCSI Boot Policy with IPv6 DHCP initiator
cisco.intersight.intersight_iscsi_boot_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "iscsi-boot-ipv6-dhcp"
description: "iSCSI boot policy with IPv6 DHCP"
iscsi_ip_type: "ipv6"
target_source_type: "static"
primary_target_policy_name: "primary-target-policy-ipv6"
initiator_ip_source: "dhcp"
state: present
- name: Create iSCSI Boot Policy with IPv6 Pool initiator
cisco.intersight.intersight_iscsi_boot_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "iscsi-boot-ipv6-pool"
description: "iSCSI boot policy with IPv6 pool"
iscsi_ip_type: "ipv6"
target_source_type: "static"
primary_target_policy_name: "primary-target-policy-ipv6"
initiator_ip_source: "pool"
initiator_ip_pool_name: "ipv6-ip-pool"
state: present
- name: Delete iSCSI Boot Policy
cisco.intersight.intersight_iscsi_boot_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "iscsi-boot-auto"
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: |