community / community.general / 0.1.1 / module / ce_dldp_interface Manages interface DLDP configuration on HUAWEI CloudEngine switches. Authors: Zhou Zhijin (@QijunPan) preview | supported by communitycommunity.general.ce_dldp_interface (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
Manages interface DLDP configuration on HUAWEI CloudEngine switches.
- name: DLDP interface test hosts: cloudengine connection: local gather_facts: no vars: cli: host: "{{ inventory_hostname }}" port: "{{ ansible_ssh_port }}" username: "{{ username }}" password: "{{ password }}" transport: cli tasks: - name: "Configure interface DLDP enable state and ensure global dldp enable is turned on" ce_dldp_interface: interface: 40GE2/0/1 enable: enable provider: "{{ cli }}" - name: "Configuire interface DLDP compatible-mode enable state and ensure interface DLDP state is already enabled" ce_dldp_interface: interface: 40GE2/0/1 enable: enable mode_enable: enable provider: "{{ cli }}" - name: "Configuire the source MAC address for DLDP packets sent in the DLDP-compatible mode and ensure interface DLDP state and compatible-mode enable state is already enabled" ce_dldp_interface: interface: 40GE2/0/1 enable: enable mode_enable: enable local_mac: aa-aa-aa provider: "{{ cli }}" - name: "Reset DLDP state of specified interface and ensure interface DLDP state is already enabled" ce_dldp_interface: interface: 40GE2/0/1 enable: enable reset: enable provider: "{{ cli }}" - name: "Unconfigure interface DLDP local mac address when C(state=absent)" ce_dldp_interface: interface: 40GE2/0/1 state: absent local_mac: aa-aa-aa provider: "{{ cli }}"
reset: choices: - enable - disable description: - Specify whether reseting interface DLDP state. state: choices: - present - absent default: present description: - Manage the state of the resource. enable: choices: - enable - disable description: - Set interface DLDP enable state. interface: description: - Must be fully qualified interface name, i.e. GE1/0/1, 10GE1/0/1, 40GE1/0/22, 100GE1/0/1. required: true local_mac: description: - Set the source MAC address for DLDP packets sent in the DLDP-compatible mode. The value of MAC address is in H-H-H format. H contains 1 to 4 hexadecimal digits. mode_enable: choices: - enable - disable description: - Set DLDP compatible-mode enable state.
changed: description: check to see if a change was made on the device returned: always sample: true type: bool end_state: description: k/v pairs of interface DLDP configuration after module execution returned: always sample: enable: enable interface: 40GE2/0/22 local_mac: 00aa-00aa-00aa mode_enable: enable reset: enable type: dict existing: description: k/v pairs of existing interface DLDP configuration returned: always sample: enable: disable interface: 40GE2/0/22 local_mac: null mode_enable: null reset: disable type: dict proposed: description: k/v pairs of parameters passed into module returned: always sample: enable: enalbe interface: 40GE2/0/22 local_mac: aa-aa-aa mode_enable: enable reset: enable type: dict updates: description: command sent to the device returned: always sample: - dldp enable - dldp compatible-mode enable - dldp compatible-mode local-mac aa-aa-aa - dldp reset type: list