openvswitch.openvswitch.openvswitch_bond module – Manage Open vSwitch bonds
Note
This module is part of the openvswitch.openvswitch collection (version 2.1.1).
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 openvswitch.openvswitch
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: openvswitch.openvswitch.openvswitch_bond
.
New in openvswitch.openvswitch 1.0.0
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 |
Comments |
---|---|
Number of milliseconds a link must be down to be deactivated to prevent flapping. |
|
Sets the bond mode Choices:
|
|
Number of milliseconds a link must be up to be activated to prevent flapping. |
|
Name of bridge to manage |
|
Path/ip to datbase socket to use Default path is used if not specified Path should start with ‘unix:’ prefix |
|
Dictionary of external_ids applied to a port. Default: |
|
List of interfaces to add to the bond |
|
Sets LACP mode Choices:
|
|
Dictionary of other_config applied to a port. Default: |
|
Name of port to manage on the bridge |
|
Sets one or more properties on a port. |
|
Whether the port should exist Choices:
|
|
How long to wait for ovs-vswitchd to respond in seconds Default: |
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
- name: Create an active-backup bond using eth4 and eth5 on bridge br-ex in second OVS database
openvswitch.openvswitch.openvswitch_bond:
bridge: br-ex
port: bond1
interfaces:
- eth4
- eth5
state: present
database_socket: unix:/opt/second.sock