community.network.ce_mtu module – Manages MTU settings 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_mtu
.
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 MTU settings on HUAWEI CloudEngine switches.
Aliases: network.cloudengine.ce_mtu
Parameters
Parameter |
Comments |
---|---|
Full name of interface, i.e. 40GE1/0/22. |
|
Maximum frame size. The default value is 9216. The value is an integer and expressed in bytes. The value range is 1536 to 12224 for the CE12800 and 1536 to 12288 for ToR switches. |
|
Non-jumbo frame size threshold. The default value is 1518. The value is an integer that ranges from 1518 to jumbo_max, in bytes. |
|
MTU for a specific interface. The value is an integer ranging from 46 to 9600, in bytes. |
|
Specify desired state of the resource. Choices:
|
Notes
Note
Either
sysmtu
param is required orinterface
ANDmtu
params are req’d.state=absent
unconfigures a given MTU if that value is currently present.Recommended connection is
network_cli
.This module also works with
local
connections for legacy playbooks.
Examples
- name: Mtu 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: "Config jumboframe on 40GE1/0/22"
community.network.ce_mtu:
interface: 40GE1/0/22
jumbo_max: 9000
jumbo_min: 8000
provider: "{{ cli }}"
- name: "Config mtu on 40GE1/0/22 (routed interface)"
community.network.ce_mtu:
interface: 40GE1/0/22
mtu: 1600
provider: "{{ cli }}"
- name: "Config mtu on 40GE1/0/23 (switched interface)"
community.network.ce_mtu:
interface: 40GE1/0/22
mtu: 9216
provider: "{{ cli }}"
- name: "Config mtu and jumboframe on 40GE1/0/22 (routed interface)"
community.network.ce_mtu:
interface: 40GE1/0/22
mtu: 1601
jumbo_max: 9001
jumbo_min: 8001
provider: "{{ cli }}"
- name: "Unconfigure mtu and jumboframe on a given interface"
community.network.ce_mtu:
state: absent
interface: 40GE1/0/22
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 mtu/sysmtu values after module execution Returned: always Sample: |
|
k/v pairs of existing mtu/sysmtu on the interface/system 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.