diff --git a/defaults/main.yml b/defaults/main.yml index 661362d7..3482ec8d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -138,7 +138,6 @@ neutron_lbaasv2: "{% if (neutron_lbaas_namespace|bool) or (neutron_lbaas_octavia neutron_plugin_base: - router - metering -neutron_plugin_loaded_base: "{% for plugin in neutron_plugin_base %}{{ plugin }}{% if not loop.last %},{% endif %}{% endfor %}{% if (neutron_lbaasv2|bool) and ('neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2' not in neutron_plugin_base) %},lbaasv2{% endif %}" # Neutron Plugins # The neutron core plugin (ML2) is defined with neutron_plug in_type, diff --git a/templates/neutron.conf.j2 b/templates/neutron.conf.j2 index e9cc79ed..9819e06b 100644 --- a/templates/neutron.conf.j2 +++ b/templates/neutron.conf.j2 @@ -1,4 +1,15 @@ # {{ ansible_managed }} +{% set neutron_plugin_loaded_base = [] %} + +{% for plugin in neutron_plugin_base %} + {% if plugin != 'dns' %} + {% set _ = neutron_plugin_loaded_base.append(plugin) %} + {% endif %} +{% endfor %} + +{% if (neutron_lbaasv2|bool) and ('neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2' not in neutron_plugin_base) %} + {% set _ = neutron_plugin_loaded_base.append("lbaasv2") %} +{%- endif -%} # General, applies to all host groups [DEFAULT] @@ -25,7 +36,7 @@ vlan_transparent = False # Plugins core_plugin = {{ neutron_plugin_core }} {% if neutron_plugin_type.split('.')[0] == 'ml2' %} -service_plugins = {{ neutron_plugin_loaded_base }} +service_plugins = {{ neutron_plugin_loaded_base | join(',') }} {% endif %} # MAC address generation for VIFs