Use ansible_service_mgr fact
This patch removes some extra tasks for detecting systemd and uses the fact instead. Partial-Bug: #1640125 Change-Id: I08023cf8344fc3b2ffdd383023d230ca3f7bdf61
This commit is contained in:
parent
5403e003b8
commit
72e6840c70
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue