community.network.ce_eth_trunk module – Manages Eth-Trunk interfaces on HUAWEI CloudEngine switches.
Note
This module is part of the community.network collection (version 5.1.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_eth_trunk
.
Note
The community.network collection has been deprecated and will be removed from Ansible 12. See the discussion thread for more information.
DEPRECATED
- Removed in:
version 6.0.0
- Why:
This collection and all content in it is unmaintained and deprecated.
- Alternative:
Unknown.
Synopsis
Manages Eth-Trunk specific configuration parameters on HUAWEI CloudEngine switches.
Aliases: network.cloudengine.ce_eth_trunk
Parameters
Parameter |
Comments |
---|---|
When true it forces Eth-Trunk members to match what is declared in the members param. This can be used to remove members. Choices:
|
|
Hash algorithm used for load balancing among Eth-Trunk member interfaces. Choices:
|
|
List of interfaces that will be managed in a given Eth-Trunk. The interface name must be full name. |
|
Specifies the minimum number of Eth-Trunk member links in the Up state. The value is an integer ranging from 1 to the maximum number of interfaces that can be added to a Eth-Trunk interface. |
|
Specifies the working mode of an Eth-Trunk interface. Choices:
|
|
Manage the state of the resource. Choices:
|
|
Eth-Trunk interface number. The value is an integer. The value range depends on the assign forward eth-trunk mode command. When 256 is specified, the value ranges from 0 to 255. When 512 is specified, the value ranges from 0 to 511. When 1024 is specified, the value ranges from 0 to 1023. |
Notes
Note
state=absent
removes the Eth-Trunk config and interface if it already exists. If members to be removed are not explicitly passed, all existing members (if any), are removed, and Eth-Trunk removed.Members must be a list.
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: Eth_trunk module test
hosts: cloudengine
connection: local
gather_facts: false
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Ensure Eth-Trunk100 is created, add two members, and set to mode lacp-static
community.network.ce_eth_trunk:
trunk_id: 100
members: ['10GE1/0/24','10GE1/0/25']
mode: 'lacp-static'
state: present
provider: '{{ cli }}'
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: |
|
k/v pairs of Eth-Trunk info after module execution Returned: always Sample: |
|
k/v pairs of existing Eth-Trunk Returned: always Sample: |
|
k/v pairs of parameters passed into module Returned: always Sample: |
|
command sent to the device Returned: always Sample: |
Status
This module will be removed in version 6.0.0. [deprecated]
For more information see DEPRECATED.