diff --git a/defaults/main.yml b/defaults/main.yml index 049b7ed1..87ca0d56 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -405,29 +405,6 @@ neutron_service_in_ldap: false # neutron_local_ip is used for the VXLAN local tunnel endpoint neutron_local_ip: 127.0.0.1 -neutron_apt_packages: - - conntrack - - dnsmasq-base - - dnsmasq-utils - - ebtables - - ipset - - iputils-arping - - keepalived - - libpq-dev - - radvd - -neutron_lxb_apt_packages: - - bridge-utils - -neutron_lbaas_apt_packages: - - haproxy - -neutron_vpnaas_apt_packages: - - openswan - -neutron_apt_remove_packages: - - conntrackd - # neutron packages that must be installed before anything else neutron_requires_pip_packages: - virtualenv diff --git a/tasks/main.yml b/tasks/main.yml index 57627a2c..52c032bd 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -24,6 +24,18 @@ tags: - always +- name: Check init system + command: cat /proc/1/comm + register: _pid1_name + tags: + - always + +- name: Set the name of pid1 + set_fact: + pid1_name: "{{ _pid1_name.stdout }}" + tags: + - always + - include: ovs_install.yml when: - neutron_services['neutron-openvswitch-agent']['group'] in group_names diff --git a/tasks/neutron_init_common.yml b/tasks/neutron_init_common.yml index ace141c6..d04544b7 100644 --- a/tasks/neutron_init_common.yml +++ b/tasks/neutron_init_common.yml @@ -14,16 +14,12 @@ # limitations under the License. - include: neutron_init_upstart.yml - when: - - ansible_distribution | lower == 'ubuntu' - - ansible_distribution_version | version_compare('16.04', '<') + when: pid1_name == "init" tags: - neutron-init - include: neutron_init_systemd.yml - when: - - ansible_distribution | lower == 'ubuntu' - - ansible_distribution_version | version_compare('16.04', '>=') + when: pid1_name == "systemd" tags: - neutron-init diff --git a/vars/ubuntu-14.04.yml b/vars/ubuntu-14.04.yml index 80b109b7..07a247ce 100644 --- a/vars/ubuntu-14.04.yml +++ b/vars/ubuntu-14.04.yml @@ -33,13 +33,30 @@ neutron_apt_dependencies: - libpq-dev - radvd +neutron_apt_packages: + - conntrack + - dnsmasq-base + - dnsmasq-utils + - ebtables + - ipset + - iputils-arping + - keepalived + - libpq-dev + - radvd + +neutron_lxb_apt_packages: + - bridge-utils + neutron_lbaas_apt_packages: - haproxy +neutron_vpnaas_apt_packages: + - openswan + neutron_apt_remove_packages: - conntrackd neutron_lbaasv1_initscript_path: "/etc/init/neutron-lbaas-agent.conf" neutron_lbaasv2_initscript_path: "/etc/init/neutron-lbaasv2-agent.conf" neutron_lbaasv1_agent_servicename: "neutron-lbaas-agent" -neutron_lbaasv2_agent_servicename: "neutron-lbaasv2-agent" \ No newline at end of file +neutron_lbaasv2_agent_servicename: "neutron-lbaasv2-agent" diff --git a/vars/ubuntu-16.04.yml b/vars/ubuntu-16.04.yml index e71c937a..b56df980 100644 --- a/vars/ubuntu-16.04.yml +++ b/vars/ubuntu-16.04.yml @@ -35,13 +35,30 @@ neutron_apt_dependencies: - libpq-dev - radvd +neutron_apt_packages: + - conntrack + - dnsmasq-base + - dnsmasq-utils + - ebtables + - ipset + - iputils-arping + - keepalived + - libpq-dev + - radvd + +neutron_lxb_apt_packages: + - bridge-utils + neutron_lbaas_apt_packages: - haproxy +neutron_vpnaas_apt_packages: + - openswan + neutron_apt_remove_packages: - conntrackd neutron_lbaasv1_initscript_path: "/etc/init/neutron-lbaas-agent.conf" neutron_lbaasv2_initscript_path: "/etc/init/neutron-lbaasv2-agent.conf" neutron_lbaasv1_agent_servicename: "neutron-lbaas-agent" -neutron_lbaasv2_agent_servicename: "neutron-lbaasv2-agent" \ No newline at end of file +neutron_lbaasv2_agent_servicename: "neutron-lbaasv2-agent"