cisco.intersight.intersight_vhba_template module – Manage vHBA Templates 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_vhba_template.
Synopsis
- Create, update, and delete vHBA Templates on Cisco Intersight.
- vHBA Templates define fibre channel interface configurations that can be used by SAN Connectivity policies.
- Templates provide a standardized way to configure vHBAs with consistent fibre channel policies.
- vHBA Templates are only applicable for FI-Attached (Fabric Interconnect) deployments.
- 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: |
description aliases: descr string | The user-defined description for the vHBA Template. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_). |
enable_override boolean | When enabled, the configuration of the derived instances may override the template configuration. Choices:
|
fibre_channel_adapter_policy_name string | Name of the Fibre Channel Adapter Policy. Required when state is present. |
fibre_channel_network_policy_name string | Name of the Fibre Channel Network Policy. Required when state is present. |
fibre_channel_qos_policy_name string | Name of the Fibre Channel QoS Policy. Required when state is present. |
fibre_channel_zone_policy_names list / elements=string | List of Fibre Channel Zone Policy names. Relationship to the FC Zone policies to configure Zones on the switch. |
name string / required | The name assigned to the vHBA Template. Must be unique within the organization. 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. Policies created within a Custom Organization are applicable only to devices in the same Organization. Use ‘default’ for the default organization. Default: |
persistent_bindings boolean | Enables retention of LUN ID associations in memory until they are manually cleared. Choices:
|
pin_group_name string | Pingroup name associated to vHBA for static pinning. SCP deploy will resolve pingroup name and fetches the corresponding uplink port/port channel to pin the vHBA traffic. |
state string | If If Choices:
|
switch_id string | The fabric port to which the vHBA will be associated. Choices:
|
tags list / elements=dictionary | List of tags in Key:<user-defined key> Value:<user-defined value> format. |
use_proxy boolean | If Choices:
|
validate_certs boolean | Boolean control for verifying the api_uri TLS certificate Choices:
|
vhba_type string | vHBA Type configuration for the template. This configuration is supported only on Cisco VIC 14XX series and higher series of adapters. Required when state is present. Choices:
|
wwpn_pool_name string | The WWPN pool that is assigned to the vHBA Template. Required when state is present. |
Examples
- name: Create a basic vHBA Template with WWPN pool
cisco.intersight.intersight_vhba_template:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "basic-vhba-template"
description: "Basic vHBA template for production servers"
enable_override: false
vhba_type: "fc-initiator"
switch_id: "A"
persistent_bindings: false
wwpn_pool_name: "default-wwpn-pool"
fibre_channel_network_policy_name: "fc-network-policy"
fibre_channel_qos_policy_name: "fc-qos-policy"
fibre_channel_adapter_policy_name: "fc-adapter-policy"
tags:
- Key: "Environment"
Value: "Production"
- Key: "Site"
Value: "DataCenter-A"
state: present
- name: Create a vHBA Template with override enabled
cisco.intersight.intersight_vhba_template:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "override-vhba-template"
description: "vHBA template with override enabled"
enable_override: true
vhba_type: "fc-target"
switch_id: "B"
persistent_bindings: true
wwpn_pool_name: "default-wwpn-pool"
fibre_channel_network_policy_name: "fc-network-policy"
fibre_channel_qos_policy_name: "fc-qos-policy"
fibre_channel_adapter_policy_name: "fc-adapter-policy"
state: present
- name: Create a vHBA Template with FC Zone policies
cisco.intersight.intersight_vhba_template:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "vhba-with-zones"
description: "vHBA template with FC zone policies"
enable_override: false
vhba_type: "fc-initiator"
switch_id: "A"
persistent_bindings: false
wwpn_pool_name: "default-wwpn-pool"
fibre_channel_network_policy_name: "fc-network-policy"
fibre_channel_qos_policy_name: "fc-qos-policy"
fibre_channel_adapter_policy_name: "fc-adapter-policy"
fibre_channel_zone_policy_names:
- "fc-zone-policy-1"
- "fc-zone-policy-2"
state: present
- name: Create a vHBA Template with pin group
cisco.intersight.intersight_vhba_template:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "vhba-pinned-template"
description: "vHBA template with static pinning"
enable_override: false
vhba_type: "fc-nvme-initiator"
switch_id: "A"
persistent_bindings: true
wwpn_address_type: "pool"
wwpn_pool_name: "nvme-wwpn-pool"
fibre_channel_network_policy_name: "fc-network-policy"
fibre_channel_qos_policy_name: "fc-qos-policy"
fibre_channel_adapter_policy_name: "fc-adapter-policy"
pin_group_name: "pingroup-a"
state: present
- name: Delete a vHBA Template
cisco.intersight.intersight_vhba_template:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "old-vhba-template"
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_vhba_template_module.html