cisco.intersight.intersight_port_policy module – Manage Port 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_port_policy
.
Synopsis
Create, update, and delete Port Policies on Cisco Intersight.
Manage port configurations including breakout ports, server roles, uplink port channels, and LAN pin groups.
Supports various device models with model-specific port configurations.
Port policies define the configuration of unified ports on fabric interconnects.
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: |
|
List of appliance port channel configurations. Port channels for direct-attached storage connectivity. |
|
Administrative speed of the port channel. Choices:
|
|
Ethernet Network Control Policy name (required). The relationship to the Fabric Network Control Policy. |
|
Ethernet Network Group Policy name (required). The relationship to the Fabric Network Group Policy. |
|
Forward Error Correction (FEC) mode. Choices:
|
|
Link Aggregation Policy name to associate. The relationship to the Link Aggregation Policy. |
|
Port mode for the appliance port channel. Choices:
|
|
Port Channel Identifier. Valid range is 1-256. |
|
List of Ethernet ports to include in the port channel. |
|
Port ID to include in the port channel. Can be a regular port (e.g., 36) or aggregate port (e.g., ‘49/2’). Aggregate ports use breakout port syntax where ‘49/2’ means sub-port 2 of port 49. |
|
QoS priority for the appliance port channel. Choices:
|
|
Whether to create/update or delete the port channel. Choices:
|
|
User-defined label for the port channel. User label must be between 0 and 128 alphanumeric characters. |
|
List of Appliance port configurations. Appliance ports are used for direct-attached storage connectivity. |
|
Administrative speed of the port. 1Gbps only allowed for ports 45-48. 40Gbps and 100Gbps only allowed for ports 49-54. Choices:
|
|
Ethernet Network Control Policy name (required). The relationship to the Fabric Network Control Policy. |
|
Ethernet Network Group Policy name (required). The relationship to the Fabric Network Group Policy. |
|
Forward Error Correction (FEC) mode. Choices:
|
|
Port mode for the appliance port. Choices:
|
|
Port ID to configure as Appliance port. Can be a regular port (e.g., 13) or aggregate port (e.g., ‘49/1’). |
|
QoS priority for the appliance port. Choices:
|
|
Whether to create/update or delete the appliance port. Choices:
|
|
User-defined label for the port. User label must be between 0 and 128 alphanumeric characters. |
|
List of breakout port configurations. Breakout ports allow splitting a high-speed port into multiple lower-speed ports. Device-specific breakout support applies (see device_model documentation). UCS-FI-6664 does not support breakout ports at all. |
|
Breakout mode for the ports. Ethernet breakout modes (BreakoutEthernet10G, BreakoutEthernet25G) are supported on all models that support breakout. FC breakout modes (BreakoutFibreChannel8G, BreakoutFibreChannel16G, BreakoutFibreChannel32G) are only supported on UCS-FI-6536 and UCSX-S9108-100G. Choices:
|
|
Port ID to configure for breakout. This port will be split into multiple sub-ports (e.g., ‘49/1’, ‘49/2’, ‘49/3’, ‘49/4’). Must be within the device’s supported breakout port range. UCS-FI-6454: ports 49-54 (Ethernet breakout only) UCS-FI-64108: ports 97-108 (Ethernet breakout only) UCS-FI-6536: ports 1-32 (Ethernet breakout only), ports 33-36 (FC breakout only) UCSX-S9108-100G: ports 1-2 (FC breakout only), ports 3-6 (Ethernet breakout) UCS-FI-6536: ports 1-36 (including FC ports) UCSX-S9108-100G: ports 1-8 |
|
Whether to create/update or delete the breakout port configuration. Choices:
|
|
The user-defined description for the Port Policy. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_). |
|
The device model for which the Port Policy is intended. Different models support different port configurations and capabilities. Required when UCS-FI-6454: 54 ports (1-54), FC ports 1-16, breakout ports 49-54 UCS-FI-64108: 108 ports (1-108), FC ports 1-16, breakout ports 97-108, 1Gbps only on ports 89-96, 40/100Gbps only on ports 97-108 UCS-FI-6536: 36 ports (1-36), FC only via breakout ports 33-36, all ports support breakout, 1Gbps only on ports 9-10 UCS-FI-6664: 64 ports (1-64), FC ports 25-40, no breakout support, 40/100Gbps only on ports 1-24 and 41-64 UCSX-S9108-100G: 8 ports (1-8), FC only via breakout ports 1-2, 1Gbps only on ports 7-8 Choices:
|
|
List of Ethernet uplink port channel configurations. Port channels aggregate multiple Ethernet ports into a single logical link. |
|
Administrative speed of the port channel. Choices:
|
|
List of Ethernet Network Group Policy names to associate. The Ethernet Network Group Policy specifies a set of VLANs to allow on the uplink port. The specified VLAN set must be either identical or disjoint from those specified on other uplink interfaces. Ensure that the VLANs are defined in the VLAN Policy and ‘Auto Allow on Uplinks’ option is disabled. Note, default VLAN-1 is auto allowed and can be specified as the native VLAN. |
|
Forward Error Correction (FEC) mode. Choices:
|
|
Flow Control Policy name to associate. |
|
Link Aggregation Policy name to associate. |
|
Link Control Policy name to associate. |
|
Port Channel Identifier. Valid range is 1-256. |
|
List of Ethernet ports to include in the port channel. |
|
Port ID to include in the port channel. Can be a regular port (e.g., 36) or aggregate port (e.g., ‘49/2’). Aggregate ports use breakout port syntax where ‘49/2’ means sub-port 2 of port 49. |
|
Whether to create/update or delete the port channel. Choices:
|
|
User-defined label for the port channel. User label must be between 0 and 128 alphanumeric characters. |
|
List of Ethernet Uplink port configurations. Ethernet Uplink ports connect to upstream network switches. |
|
Administrative speed of the port. Speed restrictions apply based on port numbers. Choices:
|
|
List of Ethernet Network Group Policy names. The Ethernet Network Group Policy specifies a set of VLANs to allow on the uplink port. The specified VLAN set must be either identical or disjoint from those specified on other uplink interfaces. Ensure that the VLANs are defined in the VLAN Policy and ‘Auto Allow on Uplinks’ option is disabled. Note, default VLAN-1 is auto allowed and can be specified as the native VLAN. |
|
Forward Error Correction (FEC) mode. Choices:
|
|
Flow Control Policy name. |
|
Link Control Policy name. |
|
MAC Security Policy name. The relationship to the Media Access Control Security (MACsec) Policy. |
|
Port ID to configure as Ethernet Uplink. Can be a regular port (e.g., 14) or aggregate port (e.g., ‘49/1’). |
|
Whether to create/update or delete the Ethernet Uplink port. Choices:
|
|
User-defined label for the port. User label must be between 0 and 128 alphanumeric characters. |
|
Configure Fibre Channel port mode for a range of ports. This converts Ethernet ports to Fibre Channel ports. Only one FC port mode configuration is allowed per policy. Device-specific FC port ranges apply (see device_model documentation). For UCS-FI-6536 and UCSX-S9108-100G, fc_port_mode is not supported. FC functionality is available through breakout ports only. If specified, this parameter will be ignored with a warning. |
|
Ending port ID for FC mode configuration. Valid values depend on device model and supported FC range. For UCS-FI-6454/64108, valid values are 4, 8, 12, or 16. For UCS-FI-6664, must be within range 25-40. Not applicable for UCS-FI-6536 and UCSX-S9108-100G (use breakout ports for FC). |
|
Starting port ID for FC mode configuration. For UCS-FI-6454/64108, must be 1 (minimum FC port). For UCS-FI-6664, must be 25 (minimum FC port). Not applicable for UCS-FI-6536 and UCSX-S9108-100G (use breakout ports for FC). Default: |
|
Whether to enable or disable FC port mode. Choices:
|
|
List of FC Storage port configurations. FC Storage ports are used for direct storage connectivity. For UCS-FI-6454, UCS-FI-64108, UCS-FI-6664 requires fc_port_mode configuration. For UCS-FI-6536, UCSX-S9108-100G uses FC breakout ports (no fc_port_mode needed). |
|
Administrative speed of the FC port. Choices:
|
|
Port ID to configure as FC Storage. Must be within the FC port mode range. Can be a regular port (e.g., 2) or aggregate port for FC breakout (e.g., ‘36/2’). For aggregate ports, the base port must be configured as FC breakout. |
|
Whether to create/update or delete the FC Storage port. Choices:
|
|
User-defined label for the port. User label must be between 0 and 128 alphanumeric characters. |
|
VSAN ID associated to the FC Storage port. |
|
List of FC uplink port channel configurations. Port channels aggregate multiple FC ports into a single logical link. Only applicable when fc_port_mode is configured. |
|
Administrative speed of the FC port channel. Choices:
|
|
Port Channel Identifier. Valid range is 1-256. |
|
List of FC ports to include in the port channel. Ports must be within the FC port mode range. |
|
FC port ID to include in the port channel. |
|
Whether to create/update or delete the port channel. Choices:
|
|
User-defined label for the port channel. User label must be between 0 and 128 alphanumeric characters. |
|
VSAN ID associated to the FC port channel. Default: |
|
List of FC Uplink port configurations. FC Uplink ports are used for Fibre Channel connectivity to storage networks. For UCS-FI-6454, UCS-FI-64108, UCS-FI-6664 requires fc_port_mode configuration. For UCS-FI-6536, UCSX-S9108-100G uses FC breakout ports (no fc_port_mode needed). |
|
Administrative speed of the FC port. Choices:
|
|
Port ID to configure as FC Uplink. Must be within the FC port mode range. Can be a regular port (e.g., 1) or aggregate port for FC breakout (e.g., ‘36/1’). For aggregate ports, the base port must be configured as FC breakout. |
|
Whether to create/update or delete the FC Uplink port. Choices:
|
|
User-defined label for the port. User label must be between 0 and 128 alphanumeric characters. |
|
Virtual SAN Identifier associated to the FC port. |
|
List of FCoE uplink port channel configurations. Port channels provide Fibre Channel over Ethernet connectivity. |
|
Administrative speed of the port channel. Choices:
|
|
Forward Error Correction (FEC) mode. Choices:
|
|
Link Aggregation Policy name to associate. The relationship to the Link Aggregation Policy. |
|
Link Control Policy name to associate. |
|
Port Channel Identifier. Valid range is 1-256. |
|
List of Ethernet ports to include in the port channel. |
|
Port ID to include in the port channel. Can be a regular port (e.g., 36) or aggregate port (e.g., ‘49/2’). Aggregate ports use breakout port syntax where ‘49/2’ means sub-port 2 of port 49. |
|
Whether to create/update or delete the port channel. Choices:
|
|
User-defined label for the port channel. User label must be between 0 and 128 alphanumeric characters. |
|
List of FCoE Uplink port configurations. FCoE Uplink ports provide Fibre Channel over Ethernet connectivity. |
|
Administrative speed of the port. Choices:
|
|
Forward Error Correction (FEC) mode. Choices:
|
|
Link Control Policy name. |
|
Port ID to configure as FCoE Uplink. Can be a regular port (e.g., 15) or aggregate port (e.g., ‘49/1’). |
|
Whether to create/update or delete the FCoE Uplink port. Choices:
|
|
User-defined label for the port. User label must be between 0 and 128 alphanumeric characters. |
|
The name assigned to the Port 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: |
|
List of pin group configurations (both LAN and SAN). Pin groups control traffic distribution across uplinks. LAN pin groups are used for Ethernet uplink ports and port channels. SAN pin groups are used for FCoE uplink ports and port channels. |
|
Name of the pin group. |
|
Type of pin group. Use ‘lan’ for Ethernet uplink ports and port channels. Use ‘san’ for FCoE uplink ports and port channels. Choices:
|
|
Whether to create/update or delete the pin group. Choices:
|
|
Name or identifier of the target interface. For pc, this should be the pc_id of an uplink port channel. For port, this should be the port identifier (e.g., ‘14’ or ‘49/1’). |
|
Type of target interface. Choices:
|
|
List of server port configurations. Server ports connect to server adapters. |
|
Forward Error Correction (FEC) mode. Choices:
|
|
Enable manual numbering on the port. When true, preferred_device_type defaults to ‘Chassis’ and preferred_device_id becomes required. Cannot be true for aggregate ports (e.g., ‘49/1’) as manual numbering is not supported on breakout ports. Chassis and Rack Servers are numbered automatically as discovered. Chassis are numbered separately from rack servers. Enable this to allow manual setting of discovered device IDs. Choices:
|
|
Port ID to configure as server port. Can be a regular port (e.g., 49) or aggregate port (e.g., ‘49/2’). Aggregate ports use breakout port syntax where ‘49/2’ means sub-port 2 of port 49. |
|
Preferred device ID when manual chassis/server numbering is enabled. Required when manual_numbering is true or when preferred_device_type is specified. |
|
Preferred device type when manual chassis/server numbering is enabled. Defaults to ‘Chassis’ when manual_numbering is true. Choices:
|
|
Whether to create/update or delete the server port configuration. Choices:
|
|
User-defined label for the port. User label must be between 0 and 128 alphanumeric characters. |
|
If If Choices:
|
|
List of tags in Key:<user-defined key> Value:<user-defined value> format. |
|
If Choices:
|
|
Boolean control for verifying the api_uri TLS certificate Choices:
|
Examples
- name: Create a Port Policy with breakout ports and server ports
cisco.intersight.intersight_port_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "port-policy-example"
description: "Example port policy with various configurations"
device_model: "UCS-FI-6454"
tags:
- Key: "Environment"
Value: "Production"
breakout_ports:
- port_id: 49
custom_mode: "BreakoutEthernet25G"
state: present
server_ports:
- port_id: 1
fec: "Auto"
manual_numbering: false
user_label: "Server Port 1"
state: present
- port_id: 2
fec: "Auto"
manual_numbering: true
preferred_device_type: "RackServer"
preferred_device_id: 2
user_label: "Server Port with Manual Numbering"
state: present
state: present
- name: Create a Port Policy with Ethernet uplink port channel
cisco.intersight.intersight_port_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "port-policy-with-pc"
description: "Port policy with port channel configurations"
device_model: "UCS-FI-6454"
ethernet_uplink_port_channels:
- pc_id: 123
admin_speed: "25Gbps"
fec: "Auto"
user_label: "Uplink PC 123"
ports:
- port_id: 36
- port_id: 37
- port_id: "49/1"
- port_id: "49/2"
eth_network_group_policy_names:
- "default-network-group"
flow_control_policy_name: "default-flow-control"
link_aggregation_policy_name: "default-link-aggregation"
link_control_policy_name: "default-link-control"
state: present
state: present
- name: Create a Port Policy with FC uplink port channel
cisco.intersight.intersight_port_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "fc-port-channel-policy"
device_model: "UCS-FI-6454"
fc_port_mode:
port_id_end: 8
state: present
fc_uplink_port_channels:
- pc_id: 13
admin_speed: "16Gbps"
vsan_id: 1
ports:
- port_id: 1
- port_id: 2
- port_id: 3
- port_id: 4
state: present
state: present
- name: Create a Port Policy with appliance port channel
cisco.intersight.intersight_port_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "appliance-pc-policy"
device_model: "UCS-FI-6454"
appliance_port_channels:
- pc_id: 21
admin_speed: "Auto"
fec: "Auto"
priority: "Best Effort"
mode: "trunk"
user_label: "Storage PC"
ports:
- port_id: 11
- port_id: 12
eth_network_group_policy_name: "storage-network-group"
eth_network_control_policy_name: "storage-network-control"
link_aggregation_policy_name: "default-link-aggregation"
state: present
state: present
- name: Create a Port Policy with LAN pin groups
cisco.intersight.intersight_port_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "port-policy-with-pin-groups"
description: "Port policy with LAN pin group configuration"
device_model: "UCS-FI-6454"
breakout_ports:
- port_id: 49
custom_mode: "BreakoutEthernet25G"
state: present
ethernet_uplink_port_channels:
- pc_id: 1
admin_speed: "Auto"
ports:
- port_id: 53
- port_id: 54
eth_network_group_policy_names:
- "default-network-group"
state: present
ethernet_uplink_ports:
- port_id: 14
admin_speed: "Auto"
fec: "Auto"
eth_network_group_policy_name:
- "default-network-group"
state: present
fcoe_uplink_ports:
- port_id: "49/1"
admin_speed: "Auto"
fec: "Auto"
state: present
pin_groups:
- name: "pin-group-1"
pin_group_type: "lan"
target_interface_type: "pc"
target_interface_name: "1"
state: present
- name: "pin-group-2"
pin_group_type: "lan"
target_interface_type: "port"
target_interface_name: "14"
state: present
- name: "pin-group-3"
pin_group_type: "san"
target_interface_type: "port"
target_interface_name: "49/1"
state: present
state: present
- name: Update Port Policy - manage resource states
cisco.intersight.intersight_port_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "port-policy-update"
device_model: "UCS-FI-6454"
server_ports:
- port_id: 3
user_label: "New Server Port"
state: present
- port_id: 4
state: absent
state: present
- name: Create a Port Policy with Fibre Channel ports 1-16
cisco.intersight.intersight_port_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "fc-port-policy"
device_model: "UCS-FI-6454"
fc_port_mode:
port_id_end: 16
state: present
fc_uplink_ports:
- port_id: 1
admin_speed: "8Gbps"
vsan_id: 2
user_label: "FC Uplink 1"
state: present
- port_id: "49/1"
admin_speed: "16Gbps"
vsan_id: 3
user_label: "FC Uplink Aggregate"
state: present
fc_storage_ports:
- port_id: 2
admin_speed: "8Gbps"
vsan_id: 5
user_label: "FC Storage 2"
state: present
state: present
- name: Create a Port Policy with Appliance and Ethernet Uplink ports
cisco.intersight.intersight_port_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "mixed-port-policy"
device_model: "UCS-FI-6454"
appliance_ports:
- port_id: 13
admin_speed: "10Gbps"
fec: "Auto"
priority: "Best Effort"
mode: "trunk"
eth_network_group_policy_name: "default-network-group"
eth_network_control_policy_name: "default-network-control"
user_label: "Storage Appliance"
state: present
ethernet_uplink_ports:
- port_id: 14
admin_speed: "Auto"
fec: "Auto"
eth_network_group_policy_name:
- "default-network-group"
flow_control_policy_name: "default-flow-control"
link_control_policy_name: "default-link-control"
state: present
fcoe_uplink_ports:
- port_id: 15
admin_speed: "Auto"
fec: "Auto"
link_control_policy_name: "default-link-control"
user_label: "FCoE Uplink"
state: present
state: present
- name: Delete a Port Policy
cisco.intersight.intersight_port_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "port-policy-to-delete"
state: absent
# Device Model Specific Examples
- name: UCS-FI-64108 Port Policy with device-specific features
cisco.intersight.intersight_port_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "UCS-FI-64108-policy"
device_model: "UCS-FI-64108"
description: "Port policy for UCS-FI-64108 with 108 ports"
breakout_ports:
- port_id: 97
custom_mode: "BreakoutEthernet25G"
state: present
- port_id: 108
custom_mode: "BreakoutEthernet10G"
state: present
ethernet_uplink_ports:
- port_id: 89
admin_speed: "1Gbps"
state: present
- port_id: 97
admin_speed: "100Gbps"
state: present
state: present
- name: UCS-FI-6536 Port Policy with FC breakout support
cisco.intersight.intersight_port_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "UCS-FI-6536-policy"
device_model: "UCS-FI-6536"
description: "Port policy for UCS-FI-6536 with FC breakout"
breakout_ports:
- port_id: 36
custom_mode: "BreakoutFibreChannel16G"
state: present
- port_id: 35
custom_mode: "BreakoutFibreChannel32G"
state: present
- port_id: 1
custom_mode: "BreakoutEthernet25G"
state: present
ethernet_uplink_ports:
- port_id: 9
admin_speed: "1Gbps"
state: present
fc_uplink_ports:
- port_id: "36/1"
admin_speed: "16Gbps"
vsan_id: 1
state: present
fc_storage_ports:
- port_id: "35/2"
admin_speed: "32Gbps"
vsan_id: 2
state: present
state: present
- name: UCS-FI-6664 Port Policy without breakout support
cisco.intersight.intersight_port_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "UCS-FI-6664-policy"
device_model: "UCS-FI-6664"
description: "Port policy for UCS-FI-6664 - no breakout support"
fc_port_mode:
port_id_start: 25
port_id_end: 40
state: present
ethernet_uplink_ports:
- port_id: 1
admin_speed: "100Gbps"
state: present
- port_id: 50
admin_speed: "40Gbps"
state: present
fc_uplink_ports:
- port_id: 25
admin_speed: "32Gbps"
vsan_id: 1
state: present
state: present
- name: UCSX-S9108-100G Port Policy with FC breakout
cisco.intersight.intersight_port_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "UCSX-S9108-100G-policy"
device_model: "UCSX-S9108-100G"
description: "Port policy for UCSX-S9108-100G with FC breakout"
breakout_ports:
- port_id: 1
custom_mode: "BreakoutFibreChannel16G"
state: present
- port_id: 2
custom_mode: "BreakoutFibreChannel8G"
state: present
ethernet_uplink_ports:
- port_id: 7
admin_speed: "1Gbps"
state: present
- port_id: 8
admin_speed: "1Gbps"
state: present
fc_uplink_ports:
- port_id: "1/1"
admin_speed: "16Gbps"
vsan_id: 1
state: present
- port_id: "2/3"
admin_speed: "8Gbps"
vsan_id: 1
state: present
state: present
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: |