diff --git a/playbooks/cluster_setup_network.yaml b/playbooks/cluster_setup_network.yaml index f7dfcd957..40247fd2c 100644 --- a/playbooks/cluster_setup_network.yaml +++ b/playbooks/cluster_setup_network.yaml @@ -7,6 +7,23 @@ # configure VMs. --- + +- name: Configure cluster network + hosts: cluster_machines + tasks: + - name: Remove team0 bridge in OVS + command: "/usr/bin/ovs-vsctl --if-exists del-br team0" + - name: Create team0 bridge in OVS + command: "/usr/bin/ovs-vsctl add-br team0" + - name: Enable RSTP on team0 bridge + command: "/usr/bin/ovs-vsctl set Bridge team0 rstp_enable=true" + - name: Set RSTP priority on team0 bridge + command: "/usr/bin/ovs-vsctl set Bridge team0 other_config=rstp-priority=16384" + - name: Add interface team0_0 to team0 bridge + command: "/usr/bin/ovs-vsctl -- --if-exists del-port {{ team0_0 }} -- add-port team0 {{ team0_0 }}" + - name: Add interface team0_1 to team0 bridge + command: "/usr/bin/ovs-vsctl -- --if-exists del-port {{ team0_1 }} -- add-port team0 {{ team0_1 }}" + - name: Configure OVS hosts: hypervisors vars: diff --git a/templates/ovs_configuration.json.j2 b/templates/ovs_configuration.json.j2 index a3a4773d4..5c8a06ea6 100644 --- a/templates/ovs_configuration.json.j2 +++ b/templates/ovs_configuration.json.j2 @@ -1,2 +1,2 @@ -{% set OVS_configuration = ({ "bridges": ovs_bridges, "unbind_pci_address": unbind_pci_address | default([]) }) %} +{% set OVS_configuration = ({ "bridges": ovs_bridges, "ignored_bridges": ignored_bridges, "unbind_pci_address": unbind_pci_address | default([]) }) %} {{ OVS_configuration | to_nice_json }}