]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-common: port main handler to use new ceph version facts
authorAlfredo Deza <adeza@redhat.com>
Wed, 27 Apr 2016 14:34:08 +0000 (10:34 -0400)
committerAlfredo Deza <adeza@redhat.com>
Wed, 27 Apr 2016 17:46:52 +0000 (13:46 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
roles/ceph-common/handlers/main.yml
roles/ceph-common/tasks/main.yml

index 62422a06608a0328f81966679675a8f86d89dbdb..ca7102645e940202d247823b7e38aee27e1cf727 100644 (file)
@@ -8,8 +8,8 @@
   when:
     socket.rc == 0 and
     ansible_distribution != 'Ubuntu' and
-    mon_group_name in group_names and not
-    is_ceph_infernalis
+    mon_group_name in group_names and
+    is_before_infernalis
 
 - name: restart ceph mons with systemd
   service:
@@ -19,7 +19,7 @@
     socket.rc == 0 and
     ansible_distribution != 'Ubuntu' and
     mon_group_name in group_names and
-    is_ceph_infernalis
+    is_after_hammer
 
 - name: restart ceph mons on ubuntu
   command: initctl restart ceph-mon cluster={{ cluster }} id={{ monitor_name }}
@@ -34,7 +34,7 @@
     socket.rc == 0 and
     ansible_distribution != 'Ubuntu' and
     osd_group_name in group_names and
-    not is_ceph_infernalis
+    is_before_infernalis
 
 # This does not just restart OSDs but everything else too. Unfortunately
 # at this time the ansible role does not have an OSD id list to use
@@ -47,7 +47,7 @@
     socket.rc == 0 and
     ansible_distribution != 'Ubuntu' and
     osd_group_name in group_names and
-    is_ceph_infernalis
+    is_after_hammer
 
 - name: restart ceph osds on ubuntu
   shell: |
@@ -99,7 +99,7 @@
     socketrgw.rc == 0 and
     ansible_distribution != 'Ubuntu' and
     rgw_group_name in group_names and
-    not is_ceph_infernalis
+    is_before_infernalis
 
 - name: restart ceph rgws on red hat
   command: /etc/init.d/ceph-radosgw restart
     socketrgw.rc == 0 and
     ansible_os_family == 'RedHat' and
     rgw_group_name in group_names and
-    not is_ceph_infernalis
+    is_before_infernalis
 
 - name: restart ceph rgws with systemd
   service:
     socketrgw.rc == 0 and
     ansible_distribution != 'Ubuntu' and
     rgw_group_name in group_names and
-    is_ceph_infernalis
+    is_after_hammer
 
 - name: restart apache2
   service:
index 2504edfe713267adc1a3b6937275784a18bf38bc..3513e63ca9aa0b56fbf0395c336470ea27200e06 100644 (file)
@@ -1,6 +1,4 @@
 ---
-- include: facts.yml
-
 - include: ./checks/check_system.yml
 
 - include: ./checks/check_mandatory_vars.yml
@@ -66,6 +64,8 @@
   tags:
     - package-install
 
+- include: facts.yml
+
 - set_fact:
     dir_owner: ceph
     dir_group: ceph