cisco.intersight.intersight_ethernet_network_control_policy module – Ethernet Network Control Policy configuration 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_ethernet_network_control_policy
.
Synopsis
Manages Ethernet Network Control Policy configuration on Cisco Intersight.
A policy to configure network control settings for ethernet connections on Cisco Intersight managed servers.
This policy is applicable only for UCS Servers (FI-Attached).
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: |
|
Enables the CDP on an interface. Cisco Discovery Protocol (CDP) is a proprietary Data Link Layer protocol developed by Cisco Systems. Choices:
|
|
The user-defined description for the Ethernet Network Control Policy. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_). |
|
Determines if the MAC forging is allowed or denied on an interface. allow - Allows MAC forging on the interface. deny - Denies MAC forging on the interface. Choices:
|
|
Determines if the LLDP frames can be received by an interface on the switch. Link Layer Discovery Protocol (LLDP) is a vendor-neutral link layer protocol. Choices:
|
|
Determines if the LLDP frames can be transmitted by an interface on the switch. Link Layer Discovery Protocol (LLDP) is a vendor-neutral link layer protocol. Choices:
|
|
Determines the MAC addresses that have to be registered with the switch. nativeVlanOnly - Register only the MAC addresses learned in the native VLAN. allVlans - Register the MAC addresses learned in all VLANs. Choices:
|
|
The name assigned to the Ethernet Network Control Policy. The name must be between 1 and 62 alphanumeric characters, allowing special characters :-_. |
|
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. Default: |
|
If If Choices:
|
|
List of tags in Key:<user-defined key> Value:<user-defined value> format. |
|
Determines the state of the virtual interface (vethernet / vfc) on the switch when a suitable uplink is not pinned. linkDown - The vethernet will go down. warning - The vethernet will remain up and will not fail over if uplink connectivity is lost. Important! If the Action on Uplink is set to Warning, the switch will not fail over if uplink connectivity is lost. Choices:
|
|
If Choices:
|
|
Boolean control for verifying the api_uri TLS certificate Choices:
|
Examples
- name: Create an Ethernet Network Control Policy with default settings
cisco.intersight.intersight_ethernet_network_control_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "default-network-control-policy"
description: "Default Ethernet Network Control policy"
state: present
- name: Create an Ethernet Network Control Policy with CDP and LLDP enabled
cisco.intersight.intersight_ethernet_network_control_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "default"
name: "discovery-enabled-policy"
description: "Network Control policy with discovery protocols enabled"
tags:
- Key: "Environment"
Value: "Production"
cdp_enabled: true
mac_registration_mode: "allVlans"
uplink_fail_action: "warning"
forge_mac: "deny"
lldp_transmit_enabled: true
lldp_receive_enabled: true
state: present
- name: Create an Ethernet Network Control Policy with strict security settings
cisco.intersight.intersight_ethernet_network_control_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "secure-network-control-policy"
description: "Secure Network Control policy with MAC forging denied"
cdp_enabled: false
mac_registration_mode: "nativeVlanOnly"
uplink_fail_action: "linkDown"
forge_mac: "deny"
lldp_transmit_enabled: false
lldp_receive_enabled: false
state: present
- name: Delete an Ethernet Network Control Policy
cisco.intersight.intersight_ethernet_network_control_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "secure-network-control-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: |