Skip to content
Snippets Groups Projects
Commit 1b96b89d authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

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

parents e838c679 90e9dc9e
No related branches found
No related tags found
No related merge requests found
...@@ -20,12 +20,31 @@ ...@@ -20,12 +20,31 @@
- name: Ensuring OVS bridge is properly setup - name: Ensuring OVS bridge is properly setup
become: true become: true
command: "{{ kolla_container_engine }} exec openvswitch_db /usr/local/bin/kolla_ensure_openvswitch_configured {{ item.0 }} {{ item.1 }}" kolla_toolbox:
register: status container_engine: "{{ kolla_container_engine }}"
changed_when: status.stdout.find('changed') != -1 user: root
module_name: openvswitch_bridge
module_args:
bridge: "{{ item.0 }}"
fail_mode: secure
loop:
- "{{ neutron_bridge_name.split(',') }}"
when: when:
- inventory_hostname in groups["network"] - inventory_hostname in groups["network"]
or (inventory_hostname in groups["compute"] and computes_need_external_bridge | bool ) 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: with_together:
- "{{ neutron_bridge_name.split(',') }}" - "{{ neutron_bridge_name.split(',') }}"
- "{{ neutron_external_interface.split(',') }}" - "{{ neutron_external_interface.split(',') }}"
when:
- inventory_hostname in groups["network"]
or (inventory_hostname in groups["compute"] and computes_need_external_bridge | bool )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment