intersight_ethernet_network_group_policy
Ethernet Network Group Policy configuration for Cisco Intersight
Collection: cisco.intersight
Full Name: cisco.intersight.intersight_ethernet_network_group_policy
Synopsis
Ethernet Network Group Policy configuration for Cisco Intersight
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| api_private_key | string | 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—– | ||
| api_uri | string | https://intersight.com/api/v1 | URI used to access the Intersight API. If not set, the value of the INTERSIGHT_API_URI environment variable is used. | |
| api_key_id | string | Public API Key ID associated with the private key. If not set, the value of the INTERSIGHT_API_KEY_ID environment variable is used. Required if I(api_bearer_token) is not provided. | ||
| api_bearer_token | string | Bearer token for OAuth2 authentication with the Intersight API. When provided, I(api_key_id) and I(api_private_key) are not required and the C(cryptography) Python library is not needed. If not set, the value of the INTERSIGHT_API_BEARER_TOKEN environment variable is used. Secret value; omitted from logs and results. | ||
| validate_certs | bool | true | Boolean control for verifying the api_uri TLS certificate | |
| use_proxy | bool | true | If C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts. | |
| state | string | present | If C(present), will verify the resource is present and will create if needed. If C(absent), will verify the resource is absent and will delete if needed. When C(absent), VLAN configuration parameters are not required. Choices: present, absent | |
| organization | string | default | The name of the Organization this resource is assigned to. Profiles, Policies, and Pools that are created within a Custom Organization are applicable only to devices in the same Organization. | |
| name | string | yes | The name assigned to the Ethernet Network Group Policy. The name must be between 1 and 64 alphanumeric characters, allowing special characters :-_. | |
| description | string | The user-defined description for the Ethernet Network Group Policy. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_). | ||
| tags | list | List of tags in Key: | ||
| qinq_enabled | bool | false | Enable QinQ (802.1Q-in-802.1Q) Tunneling on the vNIC. When enabled, C(qinq_vlan) is required and C(allowed_vlans) is ignored. When disabled, C(allowed_vlans) is required. | |
| qinq_vlan | int | Set QinQ VLAN number. Required when C(qinq_enabled) is true. Only one QinQ VLAN can be specified. Valid range is 2-4093. | ||
| native_vlan | int | Set native VLAN for the Ethernet Network Group Policy. Can be used with QinQ (when C(qinq_enabled) is true) or with regular VLAN mode (when C(qinq_enabled) is false). When used with C(allowed_vlans), the native VLAN must be included in the allowed VLANs list. Only one native VLAN can be specified. Valid range is 1-4093. | ||
| allowed_vlans | string | Include VLAN IDs using a list of comma separated VLAN IDs and VLAN ID Ranges. Required when C(qinq_enabled) is false. Examples of valid formats are C(1), C(1,2,3,4,8), C(1-4,7), C(1-8,12,16). Valid VLAN range is 1-4093. |
Example
yaml
- cisco.intersight.intersight_ethernet_network_group_policy:
allowed_vlans: 1-8,12,16
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
description: Policy with regular VLAN configuration
name: regular-vlans-policy
organization: default
qinq_enabled: false
state: present
name: Create an Ethernet Network Group Policy with regular VLANs
- cisco.intersight.intersight_ethernet_network_group_policy:
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
description: Policy with QinQ configuration
name: qinq-policy
native_vlan: 1
organization: default
qinq_enabled: true
qinq_vlan: 4
state: present
tags:
- Key: Environment
Value: Production
name: Create an Ethernet Network Group Policy with QinQ enabled
- cisco.intersight.intersight_ethernet_network_group_policy:
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
description: QinQ policy without native VLAN
name: qinq-no-native-policy
qinq_enabled: true
qinq_vlan: 100
state: present
name: Create an Ethernet Network Group Policy with QinQ enabled (no native VLAN)
- cisco.intersight.intersight_ethernet_network_group_policy:
allowed_vlans: "50"
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
description: Policy with single VLAN
name: single-vlan-policy
qinq_enabled: false
state: present
name: Create an Ethernet Network Group Policy with single VLAN
- cisco.intersight.intersight_ethernet_network_group_policy:
allowed_vlans: 1-100,200-300
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
description: Policy with allowed VLANs and native VLAN
name: native-vlan-policy
native_vlan: 1
qinq_enabled: false
state: present
name: Create an Ethernet Network Group Policy with native VLAN
- cisco.intersight.intersight_ethernet_network_group_policy:
api_key_id: '{{ api_key_id }}'
api_private_key: '{{ api_private_key }}'
name: qinq-policy
state: absent
name: Delete an Ethernet Network Group Policy