Use ansible_service_mgr fact

This patch removes some extra tasks for detecting systemd and uses
the fact instead.

Partial-Bug: #1640125
Change-Id: I8dbb0dd86d38073d680f25f3221b54b536f94026
This commit is contained in:
Logan V 2016-11-09 22:45:04 -06:00 committed by Jesse Pretorius (odyssey4me)
parent d8668a518b
commit 6635f6eb98
2 changed files with 4 additions and 15 deletions

View File

@ -15,11 +15,13 @@
- include: keystone_init_upstart.yml
static: no
when: pid1_name == "init"
when:
- ansible_service_mgr == 'upstart'
- include: keystone_init_systemd.yml
static: no
when: pid1_name == "systemd"
when:
- ansible_service_mgr == 'systemd'
- name: Load service
service:

View File

@ -42,19 +42,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: keystone_pre_install.yml
tags:
- keystone-install