]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Use the use_systemd fact when starting mdss
authorAndrew Schoen <aschoen@redhat.com>
Thu, 5 May 2016 19:54:50 +0000 (14:54 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Fri, 6 May 2016 19:47:45 +0000 (14:47 -0500)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
roles/ceph-common/handlers/main.yml
roles/ceph-mds/tasks/pre_requisite.yml

index 3b4ba2f5f8381f28c1087b1a2d90404392e63204..fa73ca3971cce6a14b51c270f51e6676a132ba71 100644 (file)
   when:
     socket.rc == 0 and
     ansible_distribution != 'Ubuntu' and
-    not use_systemd and
+    use_systemd and
     mds_group_name in group_names and
-    ceph_stable and
-    ceph_stable_release in ceph_stable_releases
+    is_before_infernalis
 
 - name: restart ceph mdss with systemd
   service:
@@ -87,8 +86,7 @@
     socket.rc == 0 and
     use_systemd and
     mds_group_name in group_names and
-    ceph_stable and
-    ceph_stable_release not in ceph_stable_releases
+    is_after_hammer
 
 - name: restart ceph rgws on ubuntu
   command: initctl restart radosgw cluster={{ cluster }} id=rgw.{{ ansible_hostname }}
index be9c0478ed937cb834fb5a30217a5db796c29809..fadae01553ee12a6b142aa742de17997e30dc20f 100644 (file)
@@ -63,7 +63,7 @@
     - done
     - upstart
   changed_when: false
-  when: ansible_distribution == "Ubuntu"
+  when: not use_systemd
 
 - name: activate metadata server with sysvinit
   file:
@@ -76,7 +76,7 @@
     - done
     - sysvinit
   changed_when: false
-  when: ansible_distribution != "Ubuntu"
+  when: use_systemd
 
 - name: enable systemd unit file for mds instance (for or after infernalis)
   file:
   changed_when: false
   failed_when: false
   when:
-    ansible_distribution != "Ubuntu" and
+    use_systemd and
     is_after_hammer
 
-- name: start and add that the metadata service to the init sequence (ubuntu)
+- name: start and add that the metadata service to the init sequence (upstart)
   command: initctl emit ceph-mds cluster={{ cluster }} id={{ mds_name }}
   changed_when: false
   failed_when: false
-  when: ansible_distribution == "Ubuntu"
+  when: not use_systemd
 
-- name: start and add that the metadata service to the init sequence (before infernalis)
+- name: start and add that the metadata service to the init sequence (systemd before infernalis)
   service:
     name: ceph
     state: started
     args: mds.{{ mds_name }}
   changed_when: false
   when:
-    ansible_distribution != "Ubuntu" and
+    use_systemd and
     is_before_infernalis
 
-- name: start and add that the metadata service to the init sequence (for or after infernalis)
+- name: start and add that the metadata service to the init sequence (systemd after hammer)
   service:
     name: ceph-mds@{{ mds_name }}
     state: started
     enabled: yes
   changed_when: false
   when:
-    ansible_distribution != "Ubuntu" and
+    use_systemd and
     is_after_hammer