Merge "openvswitch: use Ansible modules to set up bridge"
This commit is contained in:
commit
1b96b89df0
@ -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 )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user