kolla-ansible/ansible/roles/neutron/templates/ml2_conf.ini.j2
Sam Yaple b401a90254 Add linuxbridge as option to ansible
Allows the user to configure neutron_plugin_agent value for Ansible.
Current allowed values are openvswitch and linuxbridge.

Implements: blueprint ansible-neutron-linuxbridge

Change-Id: I0572464a5459d2f9da09b6da22db16e240511f99
2015-08-02 11:48:21 +00:00

51 lines
1.3 KiB
Django/Jinja

# ml2_conf.ini
[ml2]
# Changing type_drivers after bootstrap can lead to database inconsistencies
type_drivers = flat,vlan,vxlan
tenant_network_types = vxlan
{% if neutron_plugin_agent == "openvswitch" %}
mechanism_drivers = openvswitch,l2population
{% elif neutron_plugin_agent == "linuxbridge" %}
mechanism_drivers = linuxbridge,l2population
{% endif %}
[ml2_type_vlan]
#network_vlan_ranges = external:1000:1999
[ml2_type_flat]
flat_networks = physnet1
[ml2_type_gre]
tunnel_id_ranges = 1:1000
[ml2_type_vxlan]
vni_ranges = 1:1000
vxlan_group = 239.1.1.1
[securitygroup]
{% if neutron_plugin_agent == "openvswitch" %}
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
{% elif neutron_plugin_agent == "linuxbridge" %}
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
{% endif %}
enable_ipset = true
enable_security_group = true
[agent]
tunnel_types = vxlan
l2_population = true
arp_responder = true
{% if neutron_plugin_agent == "openvswitch" %}
[ovs]
bridge_mappings = physnet1:{{ neutron_bridge_name }}
{% elif neutron_plugin_agent == "linuxbridge" %}
[linux_bridge]
physical_interface_mappings = physnet1:{{ neutron_external_interface }}
[vxlan]
l2_population = true
{% endif %}
local_ip = {{ hostvars[inventory_hostname]['ansible_' + tunnel_interface]['ipv4']['address'] }}