]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Use the use_systemd fact when starting rgw
authorAndrew Schoen <aschoen@redhat.com>
Thu, 5 May 2016 19:31:12 +0000 (14:31 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Thu, 5 May 2016 19:31:12 +0000 (14:31 -0500)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
roles/ceph-rgw/tasks/start_radosgw.yml

index c0689ff3b21ccf23f474aa1358ccbec7e0b4ab71..b34ff26efde009fe73188f9c693ee29252fb5eb0 100644 (file)
   when:
     rgwstatus.rc != 0 and
     ansible_distribution != "Ubuntu" and
-    ansible_os_family != 'RedHat'
+    ansible_os_family != 'RedHat' and
+    not use_systemd
 
 - name: start and add that the rados gateway service to the init sequence (ubuntu)
   command: initctl emit radosgw cluster={{ cluster }} id=rgw.{{ ansible_hostname }}
   changed_when: false
   failed_when: false
-  when: ansible_distribution == 'Ubuntu'
+  when: not use_systemd
 
 - name: start rgw on red hat (before or on infernalis)
   service:
   changed_when: false
   failed_when: false
   when:
-    ansible_distribution != "Ubuntu" and
+    use_systemd and
     is_after_hammer
 
-- name: start rgw on red hat (after infernalis)
+- name: start rgw with systemd (for or after infernalis)
   service:
     name: ceph-radosgw@rgw.{{ ansible_hostname }}
     state: started
     enabled: yes
   when:
-    ansible_os_family == 'RedHat' and
+    use_systemd and
     is_after_hammer