
The upstream openvswitch collection has been deprecated and was not included in newer Ansible (like Ansible 11). Vendor the openvswitch_bridge module from that collection as we use it for multinode bridge setups. The code was fetched from: https://raw.githubusercontent.com/ansible-collections/openvswitch.openvswitch/d375078cfd942599c42fe28e46f59f063c9d3a9d/plugins/modules/openvswitch_bridge.py And is currently unmodified except for removal of the shebang (to make linter rules happy), flake8: noqa at the file level (to disable python linter checks), and a new comment block explaining why the code was vendored and where it originated from. A warning is added to the role README indicating that this role is now effectively deprecated due to its dependencies. An alternative approach that should be easier to maintain long term is suggested as well. Change-Id: I2c90d3145b50498b4759046d43b02f70c10715e7
Warning
This role currently depends on openvswitch and the now deprecated by Ansible openvswitch_bridge module. This transitively means this role is effectively deprecated as well. In order to get around the deprecation and removal of this Ansible module we have vendored it in this role. This may not work with future versions of Ansible
Ideally we would rewrite the role to use Linux bridges instead of openvswitch as this set of tooling is more readily available and common on Linux machines. We could continue to use VXLAN with Linux bridge or consider switching to GENEVE or maybe even Wireguard as alternative overlay methods during that switch.
Help is very much appreciated to make this rewrite happen.
Configures a VXLAN virtual network overlay through an openvswitch network bridge between a 'switch' node and 'peer' nodes.
This allows members of the bridge to communicate with each other through the virtual network.
By default, this role will:
- Install and start
openvswitch
- Set up a
br-infra
bridge on all nodes - Set up the connectivity between the switch and the peer with a virtual port
- Set up an ip address on the bridge interface:
172.24.4.1/23 # switch node
172.41.4.2/23 # first peer
172.41.4.3/23 # second peer
...
Role requirements
This role requires and expects two groups to be set up in the Ansible host inventory in order to work:
switch
(the node acting as the switch)peers
(nodes connected to the virtual switch ports)
Role variables