]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
moved string parsing of ceph version into ansbile for better error handling
authorJames Saint-Rossy <james_saintrossy@cable.comcast.com>
Wed, 13 Apr 2016 01:08:42 +0000 (21:08 -0400)
committerJames Saint-Rossy <james_saintrossy@cable.comcast.com>
Wed, 13 Apr 2016 01:08:42 +0000 (21:08 -0400)
roles/ceph-common/tasks/main.yml

index 02d3339209ca177d39a4c2c32cd01616fcfedfa7..8048bddb9cd1406aa569341a5bc778bc07119067 100644 (file)
     - package-install
 
 - name: get ceph version
-  shell: ceph --version | cut -f3 -d ' '
+  command: ceph --version
   changed_when: false
   register: ceph_version
 
+- set_fact:
+    ceph_version: "{{ ceph_version.stdout.split(' ')[2] }}"
+
 # 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={{ ceph_version.stdout | version_compare('9.2.0', '>=') }}
+    is_ceph_infernalis={{ ceph_version | version_compare('9.2.0', '>=') }}
 
 - set_fact:
     dir_owner: ceph