diff --git a/roles/multi-node-bridge/README.rst b/roles/multi-node-bridge/README.rst index 49ee94c68..ef9afa2be 100644 --- a/roles/multi-node-bridge/README.rst +++ b/roles/multi-node-bridge/README.rst @@ -74,3 +74,9 @@ inventory in order to work: :default: 23 The IP address range CIDR/subnet. + +.. zuul:rolevar:: install_ovs + :default: true + + Whether or not to install openvswitch. It can be set to false + when ovs installation is taken care outside of the role. diff --git a/roles/multi-node-bridge/defaults/main.yaml b/roles/multi-node-bridge/defaults/main.yaml index 1ba0c86ee..523caaf63 100644 --- a/roles/multi-node-bridge/defaults/main.yaml +++ b/roles/multi-node-bridge/defaults/main.yaml @@ -6,3 +6,4 @@ bridge_configure_address: true bridge_address_prefix: 172.24.4 bridge_address_offset: 1 bridge_address_subnet: 23 +install_ovs: true diff --git a/roles/multi-node-bridge/tasks/common.yaml b/roles/multi-node-bridge/tasks/common.yaml index a0e22cd91..6931d5cf5 100644 --- a/roles/multi-node-bridge/tasks/common.yaml +++ b/roles/multi-node-bridge/tasks/common.yaml @@ -49,6 +49,7 @@ name: "{{ ovs_package }}" state: present when: + - install_ovs|bool - ansible_distribution != 'Gentoo' - name: Install openvswitch (Gentoo) @@ -58,6 +59,7 @@ state: present jobs: 8 when: + - install_ovs|bool - ansible_distribution == 'Gentoo' - name: Ensure openvswitch is started @@ -66,6 +68,8 @@ name: "{{ ovs_service }}" state: started enabled: yes + when: + - install_ovs|bool - name: Remove RDO repository files become: yes