4ca2d41762
Second part of patchset: https://review.opendev.org/c/openstack/kolla-ansible/+/799229/ in which was suggested to split patch into smaller ones. THis change adds container_engine to module parameters so when we introduce podman, kolla_toolbox can be used for both engines. Signed-off-by: Ivan Halomi <i.halomi@partner.samsung.com> Co-authored-by: Martin Hiner <m.hiner@partner.samsung.com> Change-Id: Ic2093aa9341a0cb36df8f340cf290d62437504ad
31 lines
1.2 KiB
YAML
31 lines
1.2 KiB
YAML
---
|
|
# NOTE(mnasiadka): external_ids:system-id uniquely identifies a physical system, used by OVN and other controllers
|
|
- name: Set system-id and hw-offload
|
|
become: true
|
|
kolla_toolbox:
|
|
container_engine: "{{ kolla_container_engine }}"
|
|
user: root
|
|
module_name: openvswitch_db
|
|
module_args:
|
|
table: Open_vSwitch
|
|
record: .
|
|
col: "{{ item.col }}"
|
|
key: "{{ item.name }}"
|
|
value: "{{ item.value }}"
|
|
state: "{{ item.state | default('present') }}"
|
|
loop:
|
|
- { col: "external_ids", name: "system-id", value: "{{ openvswitch_system_id }}" }
|
|
- { col: "other_config", name: "hw-offload", value: true, state: "{{ 'present' if openvswitch_hw_offload | bool else 'absent' }}" }
|
|
|
|
- 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
|
|
when:
|
|
- inventory_hostname in groups["network"]
|
|
or (inventory_hostname in groups["compute"] and computes_need_external_bridge | bool )
|
|
with_together:
|
|
- "{{ neutron_bridge_name.split(',') }}"
|
|
- "{{ neutron_external_interface.split(',') }}"
|