Merge pull request #1735 from ceph/ceph-version-detection

common: override and autodetect ceph_stable_release
pull/1743/head
Andrew Schoen 2017-08-03 09:29:02 -05:00 committed by GitHub
commit e92b93ebeb
3 changed files with 23 additions and 2 deletions

View File

@ -27,7 +27,8 @@
msg: "make sure ceph_stable_release is set to a release name (e.g: luminous), http://docs.ceph.com/docs/master/release-notes/" msg: "make sure ceph_stable_release is set to a release name (e.g: luminous), http://docs.ceph.com/docs/master/release-notes/"
when: when:
- ceph_stable_release == 'dummy' - ceph_stable_release == 'dummy'
- not ceph_rhcs - ceph_origin == 'upstream'
- ceph_stable
tags: tags:
- package-install - package-install
@ -36,7 +37,8 @@
msg: "wrong release name, see http://docs.ceph.com/docs/master/release-notes/" msg: "wrong release name, see http://docs.ceph.com/docs/master/release-notes/"
when: when:
- ceph_stable_release not in ceph_release_num - ceph_stable_release not in ceph_release_num
- not ceph_rhcs - ceph_origin == 'upstream'
- ceph_stable
tags: tags:
- package-install - package-install

View File

@ -74,6 +74,12 @@
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent) # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False static: False
# override ceph_stable_release for ceph_dev and rhcs installations since ceph_stable_release is not mandatory
- include: ./release-rhcs.yml
when: (ceph_rhcs or ceph_dev)
tags:
- always
- include: ./misc/ntp_redhat.yml - include: ./misc/ntp_redhat.yml
when: when:
- ansible_os_family == 'RedHat' - ansible_os_family == 'RedHat'

View File

@ -0,0 +1,13 @@
---
- set_fact:
ceph_release: jewel
when: ceph_version.split('.')[0] | version_compare('10', '==')
- set_fact:
ceph_release: kraken
when: ceph_version.split('.')[0] | version_compare('11', '==')
- set_fact:
ceph_release: luminous
when: ceph_version.split('.')[0] | version_compare('12', '==')