kolla-ansible/ansible/roles/ovn/tasks/bootstrap.yml
Michal Nasiadka 8a0740df97 OVN Support
Implement OVN Ansible role.

Implements: blueprint ovn-controller-neutron-ansible

Depends-On: https://review.opendev.org/713422
Change-Id: Icd425dea85d58db49c838839d8f0b864b4a89a78
2020-04-09 07:40:12 +02:00

41 lines
1.7 KiB
YAML

---
- name: Create br-int bridge on OpenvSwitch
become: true
command: >
docker exec openvswitch_vswitchd ovs-vsctl --may-exist
add-br br-int -- set Bridge br-int fail-mode=secure
when: inventory_hostname in groups['ovn-controller']
- name: Set OVN encapsulation settings
become: true
command: >
docker exec openvswitch_vswitchd ovs-vsctl set Open_vSwitch .
external_ids:ovn-encap-ip={{ tunnel_interface_address }}
external_ids:ovn-encap-type=geneve
external_ids:ovn-remote={{ ovn_sb_connection }}
when: inventory_hostname in groups['ovn-controller']
- name: Set OVN bridge mappings
vars:
ovn_mappings: "{% for bridge in neutron_bridge_name.split(',') %}physnet{{ loop.index0 + 1 }}:{{ bridge }}{% if not loop.last %},{% endif %}{% endfor %}"
become: true
command: docker exec openvswitch_vswitchd ovs-vsctl set Open_vSwitch . external_ids:ovn-bridge-mappings={{ ovn_mappings }}
when:
- inventory_hostname in groups["ovn-controller-network"]
or (inventory_hostname in groups["ovn-controller-compute"] and computes_need_external_bridge | bool)
- name: Enable chassis as gateway
become: true
command: docker exec openvswitch_vswitchd ovs-vsctl set Open_vSwitch . external-ids:ovn-cms-options="enable-chassis-as-gw"
when:
- inventory_hostname in groups["ovn-controller-network"]
or (inventory_hostname in groups["ovn-controller-compute"] and neutron_ovn_distributed_fip | bool)
- name: Set OVN remote probe interval
become: true
command: >
docker exec openvswitch_vswitchd ovs-vsctl set Open_vSwitch .
external_ids:ovn-remote-probe-interval={{ ovn_remote_probe_interval }}
when:
- inventory_hostname in groups["ovn-controller"]