diff --git a/ansible/roles/neutron/defaults/main.yml b/ansible/roles/neutron/defaults/main.yml index 9a6a93fc77..6c247bf727 100644 --- a/ansible/roles/neutron/defaults/main.yml +++ b/ansible/roles/neutron/defaults/main.yml @@ -299,3 +299,24 @@ extension_drivers: enabled: "{{ enable_designate | bool }}" neutron_extension_drivers: "{{ extension_drivers|selectattr('enabled', 'equalto', true)|list }}" + +#################### +# Service Plugins +#################### +service_plugins: + - name: "flow_classifier" + enabled: "{{ neutron_plugin_agent == 'sfc' }}" + - name: "neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2" + enabled: "{{ enable_neutron_lbaas | bool }}" + - name: "neutron.services.firewall.fwaas_plugin.FirewallPlugin" + enabled: "{{ enable_neutron_fwaas | bool }}" + - name: "neutron_vpnaas.services.vpn.plugin.VPNDriverPlugin" + enabled: "{{ enable_neutron_vpnaas | bool }}" + - name: "qos" + enabled: "{{ enable_neutron_qos | bool }}" + - name: "router" + enabled: true + - name: "sfc" + enabled: "{{ neutron_plugin_agent == 'sfc' }}" + +neutron_service_plugins: "{{ service_plugins|selectattr('enabled', 'equalto', true)|list }}" diff --git a/ansible/roles/neutron/templates/neutron.conf.j2 b/ansible/roles/neutron/templates/neutron.conf.j2 index 57399ebec3..eed201f6d2 100644 --- a/ansible/roles/neutron/templates/neutron.conf.j2 +++ b/ansible/roles/neutron/templates/neutron.conf.j2 @@ -35,7 +35,8 @@ host = {{ ansible_hostname }}_{{ item }} allow_overlapping_ips = true core_plugin = ml2 -service_plugins = router{% if enable_neutron_lbaas | bool %},neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2{% endif %}{% if enable_neutron_qos | bool %},qos{% endif %}{% if enable_neutron_vpnaas | bool %},neutron_vpnaas.services.vpn.plugin.VPNDriverPlugin{% endif %}{% if neutron_plugin_agent == "sfc" %}flow_classifier,sfc{% endif %}{% if enable_neutron_fwaas | bool %},neutron.services.firewall.fwaas_plugin.FirewallPlugin{% endif %} + +service_plugins = {{ neutron_service_plugins|map(attribute='name')|join(',') }} {% if enable_neutron_agent_ha | bool %} dhcp_agents_per_network = {{ dhcp_agents_per_network }}