From 210e4d4a015b0039c7ba1fd1427e3df846bdd430 Mon Sep 17 00:00:00 2001 From: Derek Anderson Date: Mon, 7 Mar 2016 18:01:54 -0500 Subject: [PATCH] Added an additional task for starting/enabling a service based on a systemd target if systemd is available. Otherwise using the init script. --- roles/ceph-osd/tasks/scenarios/osd_directory.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/ceph-osd/tasks/scenarios/osd_directory.yml b/roles/ceph-osd/tasks/scenarios/osd_directory.yml index efe8d1ba7..b277b8e6d 100644 --- a/roles/ceph-osd/tasks/scenarios/osd_directory.yml +++ b/roles/ceph-osd/tasks/scenarios/osd_directory.yml @@ -31,3 +31,11 @@ name: ceph state: started enabled: yes + when: ansible_service_mgr != "systemd" + +- name: start and add the OSD target to the systemd sequence + service: + name: ceph.target + state: started + enabled: yes + when: ansible_service_mgr == "systemd"