diff --git a/defaults/main.yml b/defaults/main.yml index 2d33e84a..3a9282b5 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -197,7 +197,7 @@ neutron_services: config_type: "ini" neutron-vpnaas-agent: group: neutron_l3_agent - service_name: neutron-vpnaas-agent + service_name: neutron-vpn-agent service_en: "{{ neutron_vpnaas | bool }}" service_conf: vpnaas_agent.ini service_group: neutron_agent @@ -258,7 +258,7 @@ neutron_driver_metering: neutron.services.metering.drivers.iptables.iptables_dri neutron_driver_dhcp: neutron.agent.linux.dhcp.Dnsmasq neutron_driver_quota: neutron.db.quota.driver.DbQuotaDriver neutron_driver_firewall: neutron.agent.linux.iptables_firewall.IptablesFirewallDriver -neutron_driver_vpnaas: neutron.services.vpn.device_drivers.ipsec.OpenSwanDriver +neutron_driver_vpnaas: neutron_vpnaas.services.vpn.device_drivers.ipsec.OpenSwanDriver ## Quotas neutron_default_quota: -1 diff --git a/tasks/neutron_upstart_init.yml b/tasks/neutron_upstart_init.yml index f1dd4aeb..c34763f9 100644 --- a/tasks/neutron_upstart_init.yml +++ b/tasks/neutron_upstart_init.yml @@ -124,3 +124,17 @@ - neutron_services['neutron-lbaasv2-agent'].service_en | bool tags: - upstart-init + +- include: neutron_upstart_common_init.yml + vars: + program_name: "{{ neutron_services['neutron-vpnaas-agent'].service_name }}" + program_config_options: "{{ neutron_services['neutron-vpnaas-agent'].config_options }}" + service_name: "{{ neutron_service_name }}" + system_user: "{{ neutron_system_user_name }}" + system_group: "{{ neutron_system_group_name }}" + service_home: "{{ neutron_system_home_folder }}" + when: + - inventory_hostname in groups[neutron_services['neutron-vpnaas-agent']['group']] + - neutron_services['neutron-vpnaas-agent'].service_en | bool + tags: + - upstart-init diff --git a/templates/vpnaas_agent.ini.j2 b/templates/vpnaas_agent.ini.j2 index cb5862c3..197b7c29 100644 --- a/templates/vpnaas_agent.ini.j2 +++ b/templates/vpnaas_agent.ini.j2 @@ -1,4 +1,9 @@ # {{ ansible_managed }} +[DEFAULT] +external_network_bridge = {{ neutron_external_network_bridge }} + +interface_driver = {{ neutron_driver_interface }} + [vpnagent] vpn_device_driver = {{ neutron_driver_vpnaas }}