diff --git a/tasks/magnum_init_common.yml b/tasks/magnum_init_common.yml index b03a838..02b6cc4 100644 --- a/tasks/magnum_init_common.yml +++ b/tasks/magnum_init_common.yml @@ -16,11 +16,13 @@ - include: magnum_init_upstart.yml static: no - when: pid1_name == "init" + when: + - ansible_service_mgr == 'upstart' - include: magnum_init_systemd.yml static: no - when: pid1_name == "systemd" + when: + - ansible_service_mgr == 'systemd' - name: Load service service: diff --git a/tasks/main.yml b/tasks/main.yml index 77b5dd5..fe76482 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -23,19 +23,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: pre-install.yml tags: - magnum-install