]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
use the ansible_version variable 533/head
authorSébastien Han <seb@redhat.com>
Thu, 11 Feb 2016 16:34:44 +0000 (17:34 +0100)
committerSébastien Han <seb@redhat.com>
Thu, 11 Feb 2016 16:34:44 +0000 (17:34 +0100)
use the builtin variable to check the ansible version

Signed-off-by: Sébastien Han <seb@redhat.com>
roles/ceph-common/tasks/checks/check_system.yml

index a823fdc4094a15bd211e2d2c550f33dbaefbba00..e0c93da8b84149284dbf5c5144e6627c373db952 100644 (file)
     ceph_stable_rh_storage and
     {{ ansible_distribution_version | version_compare('7.1', '<') }}
 
-- name: check ansible version
-  local_action: shell ansible --version | awk '/[0-9].[0-9].[0-9]/ {print $2}'
-  changed_when: false
-  become: false
-  register: ansible__version
-
 - name: fail on unsupported ansible version
   fail:
     msg: "Ansible version must be >= 1.9, please update!"
-  when: "{{ ansible__version.stdout | version_compare('1.9', '<') }}"
+  when:
+    ansible_version.major|int == 1 and
+    ansible_version.minor|int < 9