diff --git a/tasks/main.yml b/tasks/main.yml index e0331ee..8e7610a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -27,19 +27,6 @@ tags: - always -- name: Check init system - command: cat /proc/1/comm - changed_when: false - register: _pid1_name - tags: - - always - -- name: Set the name of pid1 - set_fact: - pid1_name: "{{ _pid1_name.stdout }}" - tags: - - always - - include: trove_pre_install.yml tags: - trove-install diff --git a/tasks/trove_init_common.yml b/tasks/trove_init_common.yml index 08e952c..21f1b95 100644 --- a/tasks/trove_init_common.yml +++ b/tasks/trove_init_common.yml @@ -18,11 +18,13 @@ - include: trove_init_upstart.yml static: no - when: pid1_name == "init" + when: + - ansible_service_mgr == 'upstart' - include: trove_init_systemd.yml static: no - when: pid1_name == "systemd" + when: + - ansible_service_mgr == 'systemd' - name: Load service service: