Deprecated

Removed in 2.5

i

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.

ansible.builtin._cl_bridge (v2.6.20) — module

Configures a bridge port on Cumulus Linux

| "added in version" 2.1 of ansible.builtin"

Authors: Cumulus Networks (@CumulusNetworks)

deprecated | supported by community

Install Ansible via pip

Install with pip install ansible==2.6.20

Description

Configures a bridge interface on Cumulus Linux To configure a bond port use the cl_bond module. To configure any other type of interface use the cl_interface module. Follow the guidelines for bridging found in the Cumulus User Guide at U(http://docs.cumulusnetworks.com)


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Options ['virtual_mac', 'virtual_ip'] are required together
# configure a bridge vlan aware bridge.
- cl_bridge:
    name: br0
    ports: 'swp1-12'
    vlan_aware: 'yes'
  notify: reload networking
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# configure bridge interface to define a default set of vlans
- cl_bridge:
    name: bridge
    ports: 'swp1-12'
    vlan_aware: 'yes'
    vids: '1-100'
  notify: reload networking
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# define cl_bridge once in tasks file
# then write interface config in variables file
# with just the options you want.
- cl_bridge:
    name: "{{ item.key }}"
    ports: "{{ item.value.ports }}"
    vlan_aware: "{{ item.value.vlan_aware|default(omit) }}"
    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) }}"
    mtu: "{{ item.value.mtu|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_treeprio: "{{ item.value.mstpctl_treeprio|default(omit) }}"
  with_dict: "{{ cl_bridges }}"
  notify: reload networking

Inputs

    
mtu:
    description:
    - Set MTU. Configure Jumbo Frame by setting MTU to I(9000).

stp:
    choices:
    - 'yes'
    - 'no'
    default: 'yes'
    description:
    - Enables spanning tree Protocol. As of Cumulus Linux 2.5 the default bridging mode,
      only per vlan RSTP or 802.1d is supported. For the vlan aware mode, only common
      instance STP is supported

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.

ports:
    description:
    - List of bridge members.
    required: true

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.

vlan_aware:
    choices:
    - 'yes'
    - 'no'
    description:
    - Enables vlan-aware mode.

addr_method:
    choices:
    - dhcp
    description:
    - Configures the port to use DHCP. To enable this feature use the option I(dhcp).

virtual_mac:
    description:
    - Define Ethernet mac associated with Cumulus Linux VRR feature.

mstpctl_treeprio:
    description:
    - Set spanning tree root priority. Must be a multiple of 4096.

Outputs

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