Use ansible_service_mgr fact
This patch removes some extra tasks for detecting systemd and uses the `ansible_service_mgr` fact instead. Partial-Bug: #1640125 Change-Id: I70f1fb61fe879011a6bfd9517f98b8c07f793a81
This commit is contained in:
parent
24ba34384b
commit
9984f9cb09
@ -15,10 +15,12 @@
|
||||
# limitations under the License.
|
||||
|
||||
- include: cinder_init_upstart.yml
|
||||
when: pid1_name == "init"
|
||||
when:
|
||||
- ansible_service_mgr == 'upstart'
|
||||
|
||||
- include: cinder_init_systemd.yml
|
||||
when: pid1_name == "systemd"
|
||||
when:
|
||||
- ansible_service_mgr == 'systemd'
|
||||
|
||||
- name: Load service
|
||||
service:
|
||||
|
@ -25,19 +25,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: cinder_pre_install.yml
|
||||
tags:
|
||||
- cinder-install
|
||||
|
Loading…
Reference in New Issue
Block a user