ansible / ansible.builtin / v2.6.20 / module / _cl_interface
Removed in 2.5
Reason:The M(nclu) module is designed to be easier to use for individuals who are new to Cumulus Linux by exposing the NCLU interface in an automatable way. | Alternative:Use M(nclu) instead.
Configures a front panel port, loopback or management port on Cumulus Linux.
| "added in version" 2.1 of ansible.builtin"
Authors: Cumulus Networks (@CumulusNetworks)
deprecated | supported by community
pip
Install with pip install ansible==2.6.20
Configures a front panel, sub-interface, SVI, management or loopback port on a Cumulus Linux switch. For bridge ports use the cl_bridge module. For bond ports use the cl_bond module. When configuring bridge related features like the "vid" option, please follow the guidelines for configuring "vlan aware" bridging. For more details review the Layer2 Interface Guide at U(http://docs.cumulusnetworks.com)
# Options ['virtual_mac', 'virtual_ip'] are required together - name: Configure a front panel port with an IP cl_interface: name: swp1 ipv4: 10.1.1.1/24 notify: reload networking
- name: Configure front panel to use DHCP cl_interface: name: swp2 addr_family: dhcp notify: reload networking
- name: Configure a SVI for vlan 100 interface with an IP cl_interface: name: bridge.100 ipv4: 10.1.1.1/24 notify: reload networking
- name: Configure subinterface with an IP cl_interface: name: bond0.100 alias_name: my bond ipv4: 10.1.1.1/24 notify: reload networking
# define cl_interfaces once in tasks # then write interfaces in variables file # with just the options you want. - name: Create interfaces cl_interface: name: '{{ item.key }}' ipv4: '{{ item.value.ipv4 | default(omit) }}' ipv6: '{{ item.value.ipv6 | default(omit) }}' alias_name: '{{ item.value.alias_name | default(omit) }}' addr_method: '{{ item.value.addr_method | default(omit) }}' speed: '{{ item.value.link_speed | default(omit) }}' mtu: '{{ item.value.mtu | default(omit) }}' clagd_enable: '{{ item.value.clagd_enable | default(omit) }}' clagd_peer_ip: '{{ item.value.clagd_peer_ip | default(omit) }}' clagd_sys_mac: '{{ item.value.clagd_sys_mac | default(omit) }}' clagd_priority: '{{ item.value.clagd_priority | default(omit) }}' vids: '{{ item.value.vids | default(omit) }}' virtual_ip: '{{ item.value.virtual_ip | default(omit) }}' virtual_mac: '{{ item.value.virtual_mac | default(omit) }}' mstpctl_portnetwork: "{{ item.value.mstpctl_portnetwork | default('no') }}" mstpctl_portadminedge: "{{ item.value.mstpctl_portadminedge | default('no') }}" mstpctl_bpduguard: "{{ item.value.mstpctl_bpduguard | default('no') }}" with_dict: '{{ cl_interfaces }}' notify: reload networking
mtu: description: - Set MTU. Configure Jumbo Frame by setting MTU to I(9000). ipv4: description: - List of IPv4 addresses to configure on the interface. In the form I(X.X.X.X/YY). ipv6: description: - List of IPv6 addresses to configure on the interface. In the form I(X:X:X::X/YYY). name: description: - Name of the interface. required: true pvid: description: - In vlan-aware mode, defines vlan that is the untagged vlan. vids: description: - In vlan-aware mode, lists VLANs defined under the interface. speed: description: - Set speed of the swp(front panel) or management(eth0) interface. speed is in MB. location: default: - /etc/network/interfaces.d description: - Interface directory location alias_name: description: - Description of the port. virtual_ip: description: - Define IPv4 virtual IP used by the Cumulus Linux VRR feature. addr_method: choices: - loopback - dhcp description: - Address method. virtual_mac: description: - Define Ethernet mac associated with Cumulus Linux VRR feature. clagd_enable: description: - Enables the clagd daemon. This command should only be applied to the clag peerlink interface. clagd_peer_ip: description: - IP address of the directly connected peer switch interface. clagd_sys_mac: description: - Clagd system mac address. Recommended to use the range starting with 44:38:39:ff. Needs to be the same between 2 Clag switches. clagd_priority: description: - Integer that changes the role the switch has in the clag domain. The lower priority switch will assume the primary role. The number can be between 0 and 65535. mstpctl_bpduguard: description: - Enables BPDU Guard on a port in vlan-aware mode. mstpctl_portnetwork: description: - Enables bridge assurance in vlan-aware mode. mstpctl_portadminedge: description: - Enables admin edge port.
changed: description: whether the interface was changed returned: changed sample: true type: bool msg: description: human-readable report of success or failure returned: always sample: interface bond0 config updated type: string