]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Cleanup is_ceph_infernalis logic
authorJames Saint-Rossy <james_saintrossy@cable.comcast.com>
Mon, 4 Apr 2016 22:19:49 +0000 (18:19 -0400)
committerJames Saint-Rossy <james_saintrossy@cable.comcast.com>
Mon, 4 Apr 2016 22:19:49 +0000 (18:19 -0400)
roles/ceph-common/tasks/main.yml

index f40a3bdb890e5759f7a3efe420534d1ff433402b..9d4887bf88b444011ca2557e6314599742ed6a6e 100644 (file)
   tags:
     - package-install
 
-- name: get ceph rhcs version
-  shell: rpm -q --qf "%{version}\n" ceph-common | cut -f1,2 -d '.'
+- name: get ceph version
+  shell: ceph --version | cut -f3 -d ' '
   changed_when: false
-  failed_when: false
-  register: rh_storage_version
-  when: ceph_stable_rh_storage
-
-# NOTE (leseb): be careful with the following
-# somehow the YAML syntax using "is_ceph_infernalis: {{"
-# does NOT work, so we keep this syntax styling...
-- set_fact:
-    is_ceph_infernalis={{ (ceph_stable and ceph_stable_release not in ceph_stable_releases) or (ceph_dev) or (ceph_stable_rh_storage and (rh_storage_version.stdout | version_compare('0.94', '>'))) }}
+  register: ceph_version
 
+# NOTE (leseb/jsaintrocc): Your supposed to qoute variables
+# that follow colons to avoid confusion with dicts but this
+# causes issues with the boolean, so we keep this syntax styling...
 - set_fact:
-    is_ceph_infernalis=True
-  when:
-    ansible_os_family == 'Debian' and
-    ceph_stable_rh_storage
+    is_ceph_infernalis={{ ceph_version.stdout | version_compare('9.2.0', '>=') }}
 
 - set_fact:
     dir_owner: ceph