Merge "Use ansible_service_mgr fact"

This commit is contained in:
Jenkins 2016-11-10 10:03:16 +00:00 committed by Gerrit Code Review
commit bfb45472f1
2 changed files with 4 additions and 15 deletions

View File

@ -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: pre-install.yml
tags:
- monasca-install

View File

@ -14,10 +14,12 @@
# limitations under the License.
- include: monasca_init_upstart.yml
when: pid1_name == "init"
when:
- ansible_service_mgr == 'upstart'
- include: monasca_init_systemd.yml
when: pid1_name == "systemd"
when:
- ansible_service_mgr == 'systemd'
- name: Load service
service: