Merge "openvswitch: use Ansible modules to set up bridge"

This commit is contained in:
Zuul 2024-02-06 09:02:34 +00:00 committed by Gerrit Code Review
commit 1b96b89df0

View File

@ -20,12 +20,31 @@
- name: Ensuring OVS bridge is properly setup
become: true
command: "{{ kolla_container_engine }} exec openvswitch_db /usr/local/bin/kolla_ensure_openvswitch_configured {{ item.0 }} {{ item.1 }}"
register: status
changed_when: status.stdout.find('changed') != -1
kolla_toolbox:
container_engine: "{{ kolla_container_engine }}"
user: root
module_name: openvswitch_bridge
module_args:
bridge: "{{ item.0 }}"
fail_mode: secure
loop:
- "{{ neutron_bridge_name.split(',') }}"
when:
- inventory_hostname in groups["network"]
or (inventory_hostname in groups["compute"] and computes_need_external_bridge | bool )
- name: Ensuring OVS ports are properly setup
become: true
kolla_toolbox:
container_engine: "{{ kolla_container_engine }}"
user: root
module_name: openvswitch_port
module_args:
bridge: "{{ item.0 }}"
port: "{{ item.1 }}"
with_together:
- "{{ neutron_bridge_name.split(',') }}"
- "{{ neutron_external_interface.split(',') }}"
when:
- inventory_hostname in groups["network"]
or (inventory_hostname in groups["compute"] and computes_need_external_bridge | bool )