devstack-plugin-tobiko/roles/multi-node-setup/tasks/main.yaml
Eduardo Olivares 9dfaabe613 Fix tox-linters job
Change-Id: Iacaa24d6b40dae62dd79e3c02a389022f0d097d5
2023-01-24 12:31:01 +01:00

32 lines
1.1 KiB
YAML

---
- name: Configure Neutron bridge for multi node setup
when: "( ansible_play_hosts | length ) > 1"
block:
- name: Ensure the infra bridge exists
become: true
openvswitch_bridge:
bridge: "{{ infra_bridge_name }}"
state: present
fail_mode: standalone
- name: Ensure the Neutron external bridge exists
become: true
openvswitch_bridge:
bridge: "{{ neutron_external_bridge_name }}"
state: present
fail_mode: standalone
- name: Create patch port between bridges
become: true
command: >-
ovs-vsctl
--may-exist add-port {{ infra_bridge_name }}
patch-{{ neutron_external_bridge_name }} --
set interface patch-{{ neutron_external_bridge_name }}
type=patch options:peer=patch-{{ infra_bridge_name }} --
--may-exist add-port {{ neutron_external_bridge_name }}
patch-{{ infra_bridge_name }} --
set interface patch-{{ infra_bridge_name }}
type=patch options:peer=patch-{{ neutron_external_bridge_name }}