PARALLAX

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

NameTypeRequiredDefaultDescription
api_private_keystringFilename (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—– —–END EC PRIVATE KEY—–’ If not set, the value of the INTERSIGHT_API_PRIVATE_KEY environment variable is used. Required if I(api_bearer_token) is not provided. Secret value; omitted from logs and results.
api_uristringhttps://intersight.com/api/v1URI used to access the Intersight API. If not set, the value of the INTERSIGHT_API_URI environment variable is used.
api_key_idstringPublic 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_tokenstringBearer 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_certsbooltrueBoolean control for verifying the api_uri TLS certificate
use_proxybooltrueIf C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts.
statestringpresentIf 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
organizationstringdefaultThe 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.
namestringyesThe name assigned to the Ethernet Network Group Policy. The name must be between 1 and 64 alphanumeric characters, allowing special characters :-_.
descriptionstringThe 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(_).
tagslistList of tags in Key: Value: format.
qinq_enabledboolfalseEnable 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_vlanintSet QinQ VLAN number. Required when C(qinq_enabled) is true. Only one QinQ VLAN can be specified. Valid range is 2-4093.
native_vlanintSet 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_vlansstringInclude 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
Search
    ↑ ↓ move↵ openesc close