/
post-config.yml
49 lines (47 loc) · 1.73 KB
/
post-config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
# 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: "external_ids", name: "hostname", value: "{{ openvswitch_hostname }}" }
- { 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
kolla_toolbox:
container_engine: "{{ kolla_container_engine }}"
user: root
module_name: openvswitch_bridge
module_args:
bridge: "{{ item }}"
fail_mode: standalone
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 )