cisco.intersight.intersight_vnic_template module – Manage vNIC Templates for Cisco Intersight
Note
This module is part of the cisco.intersight collection (version 2.3.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_vnic_template
.
Synopsis
Create, update, and delete vNIC Templates on Cisco Intersight.
vNIC Templates define network interface configurations that can be used by LAN Connectivity policies.
Templates provide a standardized way to configure vNICs with consistent network and adapter policies.
vNIC Templates are only applicable for FI-Attached (Fabric Interconnect) deployments.
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: |
|
Source of the CDN. It can either be user specified or be the same as the vNIC name. Choices:
|
|
CDN value when cdn_source is ‘user’. |
|
Type of connection for the vNIC. Choices:
|
|
The user-defined description for the vNIC Template. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_). |
|
When enabled, the configuration of the derived instances may override the template configuration. Choices:
|
|
Relationship to the Ethernet Adapter Policy. Required when state is ‘present’. |
|
Relationship to the Ethernet QoS Policy. Required when state is ‘present’. |
|
Relationship to the Fabric Ethernet Network Control Policy. Required when state is ‘present’. |
|
Relationship to the Fabric Ethernet Group Policy. Required when state is ‘present’. |
|
Enables automatic vNIC failover to the secondary Fabric Interconnect if the primary path fails. Failover applies only to Cisco VICs that are connected to a Fabric Interconnect cluster. Choices:
|
|
Relationship to the boot iSCSI Policy. |
|
The MAC pool that is assigned to the vNIC Template. Required when state is ‘present’. |
|
The name assigned to the vNIC Template. 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: |
|
SR-IOV settings when connection_type is ‘sriov’. |
|
Completion Queue Count per VF (1-16). Default: |
|
Enable SR-IOV. Choices:
|
|
Interrupt Count per VF (1-16). Default: |
|
Receive Queue Count per VF (1-8). Default: |
|
Transmit Queue Count per VF (1-8). Default: |
|
Number of Virtual Functions (1-64). Default: |
|
If If Choices:
|
|
The fabric port to which the vNIC will be associated. Choices:
|
|
List of tags in Key:<user-defined key> Value:<user-defined value> format. |
|
If Choices:
|
|
USNIC settings when connection_type is ‘usnic’. Required when connection_type is ‘usnic’. |
|
Class of Service to be used for traffic on the usNIC. Choices:
|
|
Number of usNIC interfaces to be created. When usNIC is enabled, the valid values are from 1 to 225. When usNIC is disabled, the default value is 0. Default: |
|
Ethernet Adapter policy to be associated with the usNICs. Required when connection_type is ‘usnic’. |
|
Boolean control for verifying the api_uri TLS certificate Choices:
|
|
VMQ settings when connection_type is ‘vmq’. |
|
Enable VMQ. Choices:
|
|
Enables Virtual Machine Multi-Queue feature on the virtual interface. VMMQ allows configuration of multiple I/O queues for a single VM and thus distributes traffic across multiple CPU cores in a VM. Choices:
|
|
The number of interrupt resources to be allocated. Recommended value is the number of CPU threads or logical processors available in the server. Default: |
|
Number of sub vNICs (0-64). Only applicable when multi_queue_support is true. Default: |
|
The number of hardware Virtual Machine Queues to be allocated. The number of VMQs per adapter must be one more than the maximum number of VM NICs. Default: |
|
Name of the VMMQ Adapter Policy. Only applicable when multi_queue_support is true. |
Examples
- name: Create a basic vNIC Template
cisco.intersight.intersight_vnic_template:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "basic-vnic-template"
description: "Basic vNIC template for production servers"
enable_override: false
switch_id: "A"
failover_enabled: false
cdn_source: "vnic"
mac_pool_name: "default-mac-pool"
fabric_eth_network_group_policy_name: "default-network-group"
fabric_eth_network_control_policy_name: "default-network-control"
eth_qos_policy_name: "default-qos-policy"
eth_adapter_policy_name: "default-adapter-policy"
connection_type: "none"
tags:
- Key: "Environment"
Value: "Production"
- Key: "Site"
Value: "DataCenter-A"
state: present
- name: Create a vNIC Template with custom CDN
cisco.intersight.intersight_vnic_template:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "custom-cdn-template"
description: "vNIC template with custom CDN value"
enable_override: true
switch_id: "B"
failover_enabled: true
cdn_source: "user"
cdn_value: "Management-NIC"
mac_pool_name: "mgmt-mac-pool"
fabric_eth_network_group_policy_name: "mgmt-network-group"
fabric_eth_network_control_policy_name: "mgmt-network-control"
eth_qos_policy_name: "mgmt-qos-policy"
eth_adapter_policy_name: "mgmt-adapter-policy"
iscsi_boot_policy_name: "mgmt-iscsi-boot-policy"
connection_type: "none"
state: present
- name: Create a vNIC Template with USNIC
cisco.intersight.intersight_vnic_template:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "usnic-template"
description: "vNIC template with USNIC configuration"
enable_override: false
switch_id: "A"
mac_pool_name: "hpc-mac-pool"
fabric_eth_network_group_policy_name: "hpc-network-group"
fabric_eth_network_control_policy_name: "hpc-network-control"
eth_qos_policy_name: "hpc-qos-policy"
eth_adapter_policy_name: "hpc-adapter-policy"
connection_type: "usnic"
usnic_settings:
count: 0
cos: 5
usnic_adapter_policy_name: "hpc-adapter-policy"
state: present
- name: Create a vNIC Template with VMQ
cisco.intersight.intersight_vnic_template:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "vmq-template"
description: "vNIC template with VMQ configuration"
enable_override: false
switch_id: "A"
mac_pool_name: "vm-mac-pool"
fabric_eth_network_group_policy_name: "vm-network-group"
fabric_eth_network_control_policy_name: "vm-network-control"
eth_qos_policy_name: "vm-qos-policy"
eth_adapter_policy_name: "vm-adapter-policy"
connection_type: "vmq"
vmq_settings:
enabled: true
multi_queue_support: false
num_interrupts: 16
num_vmqs: 4
state: present
- name: Create a vNIC Template with VMQ multi-queue support
cisco.intersight.intersight_vnic_template:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "vmq-multiqueue-template"
description: "vNIC template with VMQ multi-queue configuration"
enable_override: true
switch_id: "B"
mac_pool_name: "vm-mac-pool"
fabric_eth_network_group_policy_name: "vm-network-group"
fabric_eth_network_control_policy_name: "vm-network-control"
eth_qos_policy_name: "vm-qos-policy"
eth_adapter_policy_name: "vm-adapter-policy"
connection_type: "vmq"
vmq_settings:
enabled: true
multi_queue_support: true
num_sub_vnics: 64
vmmq_adapter_policy_name: "vmmq-adapter-policy"
state: present
- name: Create a vNIC Template with SR-IOV
cisco.intersight.intersight_vnic_template:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "sriov-template"
description: "vNIC template with SR-IOV configuration"
enable_override: false
switch_id: "A"
mac_pool_name: "sriov-mac-pool"
fabric_eth_network_group_policy_name: "sriov-network-group"
fabric_eth_network_control_policy_name: "sriov-network-control"
eth_qos_policy_name: "sriov-qos-policy"
eth_adapter_policy_name: "sriov-adapter-policy"
connection_type: "sriov"
sriov_settings:
enabled: true
vf_count: 64
rx_count_per_vf: 4
tx_count_per_vf: 1
comp_count_per_vf: 5
int_count_per_vf: 8
state: present
- name: Delete a vNIC Template
cisco.intersight.intersight_vnic_template:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "old-vnic-template"
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: |