Use ansible_service_mgr fact
This patch removes some extra tasks for detecting systemd and uses the fact instead. Partial-Bug: #1640125 Change-Id: Iabcd8ecbf6e10ba8e65d3ac01ae635ce9294aec2
This commit is contained in:
committed by
Jesse Pretorius (odyssey4me)
parent
6ec6dc71c0
commit
da04d4d470
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user