openstack-ansible-os_neutron/tasks/providers/ovs_config.yml

37 lines
1.5 KiB
YAML

---
# Copyright 2018, Ericsson AB and Others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is responsible for the L3 configuration
- name: Setup External Network Provider Bridge
openvswitch_bridge:
bridge: "{{ neutron_provider_networks.network_mappings.split(':')[1] }}"
fail_mode: secure
state: present
when:
- neutron_services['neutron-openvswitch-agent']['group'] in group_names
- neutron_plugin_type in ['ml2.ovs', 'ml2.ovs.dvr']
- neutron_provider_networks.network_mappings is defined
- name: Add port to External Network Provider Bridge
openvswitch_port:
bridge: "{{ neutron_provider_networks.network_mappings.split(':')[1] }}"
port: "{{ neutron_provider_networks.network_interface }}"
state: present
when:
- neutron_services['neutron-openvswitch-agent']['group'] in group_names
- neutron_plugin_type in ['ml2.ovs', 'ml2.ovs.dvr']
- neutron_provider_networks.network_mappings is defined
- neutron_provider_networks.network_interface is defined