openvswitch.openvswitch.openvswitch_bond – Manage Open vSwitch bonds

Note

This plugin is part of the openvswitch.openvswitch collection (version 1.1.0).

To install it use: ansible-galaxy collection install openvswitch.openvswitch.

To use it in a playbook, specify: openvswitch.openvswitch.openvswitch_bond.

New in version 1.0.6: of openvswitch.openvswitch

Synopsis

  • Manage Open vSwitch bonds and associated options.

Requirements

The below requirements are needed on the host that executes this module.

  • ovs-vsctl

Parameters

Parameter Choices/Defaults Comments
bond_downdelay
integer
Number of milliseconds a link must be down to be deactivated to prevent flapping.
bond_mode
string
    Choices:
  • active-backup
  • balance-tcp
  • balance-slb
Sets the bond mode
bond_updelay
integer
Number of milliseconds a link must be up to be activated to prevent flapping.
bridge
string / required
Name of bridge to manage
external_ids
dictionary
Default:
{}
Dictionary of external_ids applied to a port.
interfaces
list / elements=string / required
List of interfaces to add to the bond
lacp
string
    Choices:
  • active
  • passive
  • off
Sets LACP mode
other_config
dictionary
Default:
{}
Dictionary of other_config applied to a port.
port
string / required
Name of port to manage on the bridge
set
list / elements=string
Sets one or more properties on a port.
state
string
    Choices:
  • present
  • absent
Whether the port should exist
timeout
integer
Default:
5
How long to wait for ovs-vswitchd to respond in seconds

Examples

- name: Create an active-backup bond using eth4 and eth5 on bridge br-ex
  openvswitch.openvswitch.openvswitch_bond:
    bridge: br-ex
    port: bond1
    interfaces:
      - eth4
      - eth5
    state: present
- name: Delete the bond from bridge br-ex
  openvswitch.openvswitch.openvswitch_bond:
    bridge: br-ex
    port: bond1
    state: absent
- name: Create an active LACP bond using eth4 and eth5 on bridge br-ex
  openvswitch.openvswitch.openvswitch_bond:
    bridge: br-ex
    port: bond1
    interfaces:
      - eth4
      - eth5
    lacp: active
    state: present
# NOTE: other_config values of integer type must be represented
# as literal strings
- name: Configure bond with miimon link monitoring at 100 millisecond intervals
  openvswitch.openvswitch.openvswitch_bond:
    bridge: br-ex
    port: bond1
    interfaces:
      - eth4
      - eth5
    bond_updelay: 100
    bond_downdelay: 100
    state: present
  args:
    other_config:
      bond-detect-mode: miimon
      bond-miimon-interval: '"100"'
- name: Create an active LACP bond using DPDK interfaces
  openvswitch.openvswitch.openvswitch_bond:
    bridge: br-provider
    port: dpdkbond
    interfaces:
      - "0000:04:00.0"
      - "0000:04:00.1"
    lacp: active
    set:
      - "interface 0000:04:00.0 type=dpdk options:dpdk-devargs=0000:04:00.0"
      - "interface 0000:04:00.1 type=dpdk options:dpdk-devargs=0000:04:00.1"
    state: present

Authors

  • James Denton (@busterswt)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/openvswitch/openvswitch/openvswitch_bond_module.html