cisco.intersight.intersight_lan_connectivity_policy module – Manage LAN Connectivity Policies and vNICs 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_lan_connectivity_policy
.
Synopsis
Create, update, and delete LAN Connectivity Policies on Cisco Intersight.
Manage individual vNICs within LAN Connectivity policies.
Supports both Standalone and FIAttached target platforms with different configuration options.
LAN Connectivity policies define network connectivity settings for server profiles.
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: |
|
Enable Azure QoS for the LAN Connectivity policy. Only applicable when target_platform is ‘attached’. Choices:
|
|
The user-defined description for the LAN Connectivity Policy. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_). |
|
IQN allocation type for the LAN Connectivity policy. Only applicable when target_platform is ‘attached’. Choices:
|
|
Relationship to the iSCSI Qualified Name Pool. Required when iqn_allocation_type is ‘Pool’. Only applicable for attached target platform. |
|
The name assigned to the LAN Connectivity 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: |
|
Placement mode for vNIC assignment. Only applicable when target_platform is ‘attached’. Choices:
|
|
If If Choices:
|
|
User provided static iSCSI Qualified Name (IQN) for use as initiator identifiers by iSCSI vNICs in a Fabric Interconnect domain. Required when iqn_allocation_type is ‘Static’. Only applicable for attached target platform. |
|
List of tags in Key:<user-defined key> Value:<user-defined value> format. |
|
The platform type for which the LAN Connectivity policy is intended. standalone for standalone servers, attached for fabric interconnect attached servers. Choices:
|
|
If Choices:
|
|
Boolean control for verifying the api_uri TLS certificate Choices:
|
|
List of vNICs to be created and attached to the LAN Connectivity policy. Each vNIC will be configured with the specified network and adapter policies. Required when At least one vNIC must be specified for both Standalone and FIAttached platforms. |
|
Enable or disable automatic assignment of the PCI Link in a dual-link adapter. This option applies only to 13xx series VICs that support dual-link. If enabled, the system determines the placement of the vNIC/vHBA on either of the PCI Links. If disabled, pci_link_assignment_mode must be specified. Only applicable for attached target platform when auto_vnic_placement_enabled is false. Choices:
|
|
Enable or disable automatic assignment of the VIC slot ID. If enabled and the server has only one VIC, the same VIC is chosen for all the vNICs. If enabled and the server has multiple VICs, the vNIC/vHBA are deployed on the first VIC. If disabled, placement_slot_id must be specified. Only applicable for attached target platform when auto_vnic_placement_enabled is false. Choices:
|
|
Enable automatic vNIC placement for FI-attached servers. When enabled, the vNIC placement is simplified to only specify the switch ID. When disabled, full placement control is available including order, auto_slot_id, and auto_pci_link. Only applicable for attached target platform. Choices:
|
|
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:
|
|
Relationship to the Ethernet Adapter Policy. Required when vNIC state is ‘present’. |
|
Relationship to the Ethernet Network Policy. Required when vNIC state is ‘present’. |
|
Relationship to the Ethernet QoS Policy. Required when vNIC state is ‘present’. |
|
Relationship to the Fabric Ethernet Network Policy. Required when target platform is attached and vNIC state is ‘present’. Only applicable for attached target platform. |
|
Relationship to the Fabric Ethernet Group Policy. Required when target platform is attached and vNIC state is ‘present’. Only applicable for attached target platform. |
|
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. Only applicable for attached target platform. Choices:
|
|
Relationship to the boot iSCSI Policy. Only applicable for attached target platform. |
|
Type of MAC address assignment. Only applicable for attached target platform. Choices:
|
|
The MAC pool that is assigned. Required when mac_address_type is ‘pool’ and target platform is attached. Only applicable for attached target platform. |
|
The name of the vNIC. Must be unique within the LAN Connectivity policy. |
|
The order in which the virtual interface is brought up. The order assigned to an interface should be unique for all the Ethernet and Fibre-Channel interfaces on each PCI link on a VIC adapter. The order should start from zero with no overlaps. The maximum value of PCI order is limited by the number of virtual interfaces (Ethernet and Fibre-Channel) on each PCI link on a VIC adapter. All VIC adapters have a single PCI link except VIC 1340, VIC 1380 and VIC 1385 which have two. Default: |
|
The PCI Link used as transport for the virtual interface. PCI Link is only applicable for select Cisco UCS VIC 1300 models (UCSC-PCIE-C40Q-03, UCSB-MLOM-40G-03, UCSB-VIC-M83-8P) that support two PCI links. The value, if specified, for any other VIC model will be ignored. For attached required when pci_link_assignment_mode is ‘Custom’. Choices:
|
|
PCI Link assignment mode when auto_pci_link is disabled. Custom allows manual selection of PCI link via pci_link parameter. Load-Balanced automatically distributes vNICs across available PCI links. Required when auto_pci_link is false and auto_vnic_placement_enabled is false. Only applicable for attached target platform. Choices:
|
|
PCIe Slot where the VIC adapter is installed. Supported values are (1-15) and MLOM. Required when vNIC state is ‘present’. |
|
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: |
|
Whether to create/update or delete the vNIC. Choices:
|
|
The MAC address must be in hexadecimal format xx:xx:xx:xx:xx:xx. To ensure uniqueness of MACs in the LAN fabric, you are strongly encouraged to use the following MAC prefix 00:25:B5:xx:xx:xx. Required when mac_address_type is ‘static’ and target platform is attached. Only applicable for attached target platform. |
|
The fabric port to which the vNICs will be associated. Only applicable for attached target platform. Choices:
|
|
Adapter port on which the virtual interface will be created. 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’. |
|
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 LAN Connectivity Policy for Standalone servers
cisco.intersight.intersight_lan_connectivity_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "standalone-lan-policy"
description: "LAN connectivity policy for standalone servers"
target_platform: "Standalone"
tags:
- Key: "Environment"
Value: "Production"
- Key: "Site"
Value: "DataCenter-A"
vnics:
- name: "eth0"
placement_slot_id: "1"
pci_link: 0
uplink_port: 0
order: 0
eth_network_policy_name: "default-network-policy"
eth_qos_policy_name: "default-qos-policy"
eth_adapter_policy_name: "default-adapter-policy"
connection_type: "none"
- name: "eth1"
placement_slot_id: "2"
pci_link: 0
uplink_port: 1
order: 1
eth_network_policy_name: "vlan-network-policy"
eth_qos_policy_name: "high-qos-policy"
eth_adapter_policy_name: "performance-adapter-policy"
connection_type: "none"
state: present
- name: Create a LAN Connectivity Policy for FI-Attached servers
cisco.intersight.intersight_lan_connectivity_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "fi-attached-lan-policy"
description: "LAN connectivity policy for FI-attached servers"
target_platform: "attached"
azure_qos_enabled: true
iqn_allocation_type: "Pool"
iqn_pool_name: "default-iqn-pool"
placement_mode: "custom"
tags:
- Key: "Environment"
Value: "Production"
vnics:
- name: "vnic-fi-attached"
order: 0
cdn_source: "vnic"
mac_address_type: "pool"
mac_pool_name: "default-mac-pool"
auto_slot_id: true
auto_pci_link: true
auto_vnic_placement_enabled: false
switch_id: "A"
failover_enabled: false
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"
state: present
state: present
- name: Create a LAN Connectivity Policy with automatic vNIC placement
cisco.intersight.intersight_lan_connectivity_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "fi-attached-auto-placement-policy"
description: "LAN connectivity policy with automatic vNIC placement"
target_platform: "attached"
azure_qos_enabled: false
iqn_allocation_type: "None"
placement_mode: "auto"
vnics:
- name: "auto-placed-vnic"
cdn_source: "vnic"
mac_address_type: "pool"
mac_pool_name: "default-mac-pool"
auto_vnic_placement_enabled: true
switch_id: "A"
failover_enabled: false
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"
state: present
state: present
- name: Create a LAN Connectivity Policy with advanced placement control
cisco.intersight.intersight_lan_connectivity_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "fi-attached-advanced-placement-policy"
description: "LAN connectivity policy with advanced placement control"
target_platform: "attached"
azure_qos_enabled: false
iqn_allocation_type: "None"
placement_mode: "custom"
vnics:
- name: "advanced-placed-vnic"
order: 9
cdn_source: "vnic"
mac_address_type: "pool"
mac_pool_name: "default-mac-pool"
auto_slot_id: false
placement_slot_id: "5"
auto_pci_link: false
pci_link_assignment_mode: "Custom"
pci_link: 0
auto_vnic_placement_enabled: false
switch_id: "A"
failover_enabled: false
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"
state: present
state: present
- name: Create a LAN Connectivity Policy with load-balanced PCI assignment
cisco.intersight.intersight_lan_connectivity_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "fi-attached-load-balanced-policy"
description: "LAN connectivity policy with load-balanced PCI assignment"
target_platform: "attached"
azure_qos_enabled: false
iqn_allocation_type: "None"
placement_mode: "custom"
vnics:
- name: "load-balanced-vnic"
order: 5
cdn_source: "vnic"
mac_address_type: "pool"
mac_pool_name: "default-mac-pool"
auto_slot_id: false
placement_slot_id: "MLOM"
auto_pci_link: false
pci_link_assignment_mode: "Load-Balanced"
auto_vnic_placement_enabled: false
switch_id: "B"
failover_enabled: true
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"
state: present
state: present
- name: Create a LAN Connectivity Policy with USNIC vNIC
cisco.intersight.intersight_lan_connectivity_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "usnic-lan-policy"
description: "Policy with USNIC configuration"
target_platform: "Standalone"
vnics:
- name: "usnic-eth0"
placement_slot_id: "4"
pci_link: 0
uplink_port: 0
order: 0
eth_network_policy_name: "hpc-network-policy"
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 LAN Connectivity Policy with VMQ vNIC
cisco.intersight.intersight_lan_connectivity_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "vmq-lan-policy"
description: "Policy with VMQ configuration"
target_platform: "Standalone"
vnics:
- name: "vmq-eth0"
placement_slot_id: "10"
pci_link: 0
uplink_port: 2
order: 0
eth_network_policy_name: "vm-network-policy"
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 LAN Connectivity Policy with VMQ multi-queue support
cisco.intersight.intersight_lan_connectivity_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "vmq-multiqueue-lan-policy"
description: "Policy with VMQ multi-queue configuration"
target_platform: "Standalone"
vnics:
- name: "vmq-mq-eth0"
placement_slot_id: "11"
pci_link: 1
uplink_port: 3
order: 0
eth_network_policy_name: "vm-network-policy"
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 LAN Connectivity Policy with SR-IOV vNIC
cisco.intersight.intersight_lan_connectivity_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "sriov-lan-policy"
description: "Policy with SR-IOV configuration"
target_platform: "Standalone"
vnics:
- name: "sriov-eth0"
placement_slot_id: "14"
pci_link: 0
uplink_port: 1
order: 0
eth_network_policy_name: "sriov-network-policy"
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: Create a LAN Connectivity Policy with custom CDN values
cisco.intersight.intersight_lan_connectivity_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "custom-cdn-lan-policy"
description: "Policy with custom CDN values"
target_platform: "Standalone"
vnics:
- name: "mgmt-nic"
placement_slot_id: "1"
pci_link: 0
uplink_port: 0
order: 0
cdn_source: "user"
cdn_value: "Management-NIC"
eth_network_policy_name: "mgmt-network-policy"
eth_qos_policy_name: "mgmt-qos-policy"
eth_adapter_policy_name: "mgmt-adapter-policy"
connection_type: "none"
state: present
- name: Update LAN connectivity policy - manage vNIC states
cisco.intersight.intersight_lan_connectivity_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "mixed-vnic-states-policy"
description: "Policy demonstrating vNIC state management"
target_platform: "Standalone"
vnics:
- name: "eth0"
placement_slot_id: "1"
pci_link: 0
uplink_port: 0
order: 0
eth_network_policy_name: "production-network"
eth_qos_policy_name: "standard-qos"
eth_adapter_policy_name: "standard-adapter"
connection_type: "none"
state: present
- name: "eth1-old"
state: absent
- name: "eth2-new"
placement_slot_id: "3"
pci_link: 0
uplink_port: 1
order: 1
eth_network_policy_name: "production-network"
eth_qos_policy_name: "standard-qos"
eth_adapter_policy_name: "standard-adapter"
connection_type: "vmq"
vmq_settings:
enabled: true
multi_queue_support: false
num_interrupts: 16
num_vmqs: 4
state: present
state: present
- name: Delete a LAN Connectivity Policy
cisco.intersight.intersight_lan_connectivity_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "old-lan-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: |