openvswitch.openvswitch.openvswitch_bridge module – Manage Open vSwitch bridges
Note
This module is part of the openvswitch.openvswitch collection (version 2.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 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_bridge
.
New in openvswitch.openvswitch 1.0.0
Synopsis
Manage Open vSwitch bridges
Requirements
The below requirements are needed on the host that executes this module.
ovs-vsctl
Parameters
Parameter |
Comments |
---|---|
Name of bridge or fake bridge to manage |
|
Path/ip to datbase socket to use Default path is used if not specified Path should start with ‘unix:’ prefix |
|
A dictionary of external-ids. Omitting this parameter is a No-op. To clear all external-ids pass an empty value. |
|
Set bridge fail-mode. The default value (None) is a No-op. |
|
Bridge parent of the fake bridge to manage |
|
Run set command after bridge configuration. This parameter is non-idempotent, play will always return changed state if present |
|
Whether the bridge should exist Choices:
|
|
How long to wait for ovs-vswitchd to respond Default: |
|
The VLAN id of the fake bridge to manage (must be between 0 and 4095). This parameter is required if parent parameter is set. |
Examples
# Create a bridge named br-int
- openvswitch.openvswitch.openvswitch_bridge:
bridge: br-int
state: present
# Create a fake bridge named br-int within br-parent on the VLAN 405
- openvswitch.openvswitch.openvswitch_bridge:
bridge: br-int
parent: br-parent
vlan: 405
state: present
# Create an integration bridge
- openvswitch.openvswitch.openvswitch_bridge:
bridge: br-int
state: present
fail_mode: secure
args:
external_ids:
bridge-id: br-int
# Create a bridge named br0 in database with socket at /opt/second.sock
- openvswitch.openvswitch.openvswitch_bridge:
bridge: br0
state: present
database_socket: unix:/opt/second.sock