From: Derek Anderson Date: Mon, 7 Mar 2016 23:01:54 +0000 (-0500) Subject: Added an additional task for starting/enabling a service based on a systemd target... X-Git-Tag: v1.0.2~8^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F608%2Fhead;p=ceph-ansible.git Added an additional task for starting/enabling a service based on a systemd target if systemd is available. Otherwise using the init script. --- 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"