community.network.ce_lldp_interface – Manages INTERFACE LLDP configuration on HUAWEI CloudEngine switches.
Note
This plugin is part of the community.network collection (version 3.0.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 community.network
.
To use it in a playbook, specify: community.network.ce_lldp_interface
.
New in version 0.2.0: of community.network
Parameters
Parameter |
Comments |
---|---|
Enable the ability to send DCBX TLV. Choices:
|
|
Enable the ability to send EEE TLV. Choices:
|
|
Used to distinguish between command line functions. Choices:
|
|
Interface name. |
|
Enable the ability to send link aggregation TLV. Choices:
|
|
Set interface lldp enable state. Choices:
|
|
Set global LLDP enable state. Choices:
|
|
Enable MAC/PHY configuration and state TLV to be sent. Choices:
|
|
Make it able to send management address TLV. Choices:
|
|
Enable the ability to send maximum frame length TLV. Choices:
|
|
Enabling the ability to send a description of TLV. Choices:
|
|
Enable port vlan tx. Choices:
|
|
Enable the ability to send protocol identity TLV. Choices:
|
|
Enable protocol vlan tx. Choices:
|
|
Manage the state of the resource. Choices:
|
|
Enable the ability to send system capabilities TLV. Choices:
|
|
Enable the ability to send system description TLV. Choices:
|
|
Enable the ability to send system name TLV. Choices:
|
|
LLDP send message interval. |
|
Set tx protocol vlan id. |
|
Set tx vlan name id. |
|
Used to distinguish between command line functions. Choices:
|
|
Used to distinguish between command line functions. Choices:
|
|
Set vlan name tx enable or not. Choices:
|
Notes
Note
This module requires the netconf system service be enabled on the remote device being managed.
Recommended connection is
netconf
.This module also works with
local
connections for legacy playbooks.
Examples
- name: "Configure global LLDP enable state"
ce_lldp_interface_interface:
lldpenable: enabled
- name: "Configure interface lldp enable state"
community.network.ce_lldp_interface:
function_lldp_interface_flag: disableINTERFACE
ifname: 10GE1/0/1
lldpadminstatus: rxOnly
- name: "Configure LLDP transmit interval and ensure global LLDP state is already enabled"
community.network.ce_lldp_interface:
function_lldp_interface_flag: intervalINTERFACE
ifname: 10GE1/0/1
txinterval: 4
- name: "Configure basic-tlv: management-address TLV"
community.network.ce_lldp_interface:
function_lldp_interface_flag: tlvdisableINTERFACE
type_tlv_disable: basic_tlv
ifname: 10GE1/0/1
manaddrtxenable: true
- name: "Configure basic-tlv: prot description TLV"
community.network.ce_lldp_interface:
function_lldp_interface_flag: tlvdisableINTERFACE
type_tlv_disable: basic_tlv
ifname: 10GE1/0/1
portdesctxenable: true
- name: "Configure basic-tlv: system capabilities TLV"
community.network.ce_lldp_interface:
function_lldp_interface_flag: tlvdisableINTERFACE
type_tlv_disable: basic_tlv
ifname: 10GE1/0/1
syscaptxenable: true
- name: "Configure basic-tlv: system description TLV"
community.network.ce_lldp_interface:
function_lldp_interface_flag: tlvdisableINTERFACE
type_tlv_disable: basic_tlv
ifname: 10GE1/0/1
sysdesctxenable: true
- name: "Configure basic-tlv: system name TLV"
community.network.ce_lldp_interface:
function_lldp_interface_flag: tlvdisableINTERFACE
type_tlv_disable: basic_tlv
ifname: 10GE1/0/1
sysnametxenable: true
- name: "TLV types that are forbidden to be published on the configuration interface, link aggregation TLV"
community.network.ce_lldp_interface:
function_lldp_interface_flag: tlvdisableINTERFACE
type_tlv_disable: dot3_tlv
ifname: 10GE1/0/1
linkAggreTxEnable: true
- name: "TLV types that are forbidden to be published on the configuration interface, MAC/PHY configuration/status TLV"
community.network.ce_lldp_interface:
function_lldp_interface_flag: tlvdisableINTERFACE
type_tlv_disable: dot3_tlv
ifname: 10GE1/0/1
macPhyTxEnable: true
- name: "TLV types that are forbidden to be published on the configuration interface, maximum frame size TLV"
community.network.ce_lldp_interface:
function_lldp_interface_flag: tlvdisableINTERFACE
type_tlv_disable: dot3_tlv
ifname: 10GE1/0/1
maxFrameTxEnable: true
- name: "TLV types that are forbidden to be published on the configuration interface, EEE TLV"
community.network.ce_lldp_interface:
function_lldp_interface_flag: tlvdisableINTERFACE
type_tlv_disable: dot3_tlv
ifname: 10GE1/0/1
eee: true
- name: "Configure the interface to publish an optional DCBX TLV type "
community.network.ce_lldp_interface:
function_lldp_interface_flag: tlvenableINTERFACE
ifname: 10GE1/0/1
type_tlv_enable: dcbx
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
check to see if a change was made on the device Returned: always Sample: true |
|
k/v pairs of global DLDP configration after module execution Returned: always Sample: {“function_lldp_interface_flag”: “tlvenableINTERFACE”, “ifname”: “10GE1/0/1”, “lldpadminstatus”: “rxOnly”, “lldpenable”: “enabled”, “type_tlv_enable”: “dot1_tlv”} |
|
k/v pairs of existing global LLDP configration Returned: always Sample: {“ifname”: “10GE1/0/1”, “lldpadminstatus”: “txAndRx”, “lldpenable”: “disabled”} |
|
k/v pairs of parameters passed into module Returned: always Sample: {“function_lldp_interface_flag”: “tlvenableINTERFACE”, “ifname”: “10GE1/0/1”, “lldpadminstatus”: “rxOnly”, “lldpenable”: “enabled”, “state”: “present”, “type_tlv_enable”: “dot1_tlv”} |
|
command sent to the device Returned: always Sample: [“lldp enable”, “interface 10ge 1/0/1”, “undo lldp disable”, “lldp tlv-enable dot1-tlv vlan-name 4”] |
Authors
xuxiaowei0512 (@CloudEngine-Ansible)