Use ansible_service_mgr fact

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

Partial-Bug: #1640125
Change-Id: I10835cde27d6a85446675d8b3ab04cb1be407942
This commit is contained in:
Logan V
2016-11-09 22:42:15 -06:00
committed by Jesse Pretorius (odyssey4me)
parent 74589413c5
commit 24077abc9b
2 changed files with 4 additions and 16 deletions
+4 -2
View File
@@ -14,10 +14,12 @@
# limitations under the License.
- include: designate_init_upstart.yml
when: pid1_name == "init"
when:
- ansible_service_mgr == 'upstart'
- include: designate_init_systemd.yml
when: pid1_name == "systemd"
when:
- ansible_service_mgr == 'systemd'
- name: Load service
service:
-14
View File
@@ -24,19 +24,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: designate_pre_install.yml
tags:
- designate-install
@@ -66,4 +53,3 @@
- name: Flush handlers
meta: flush_handlers