Merge pull request #664 from jsaintrocc/master

Add infernalis to list of stable releases comment
pull/719/head
Leseb 2016-04-19 10:09:48 +02:00
commit f950afef92
7 changed files with 20 additions and 36 deletions

View File

@ -90,6 +90,7 @@ dummy:
# - firefly # - firefly
# - giant # - giant
# - hammer # - hammer
# - infernalis
# Use the option below to specify your applicable package tree, eg. when using non-LTS Ubuntu versions # Use the option below to specify your applicable package tree, eg. when using non-LTS Ubuntu versions
# # for a list of available Debian distributions, visit http://ceph.com/debian-{{ ceph_stable_release }}/dists/ # # for a list of available Debian distributions, visit http://ceph.com/debian-{{ ceph_stable_release }}/dists/

View File

@ -82,6 +82,7 @@ ceph_stable_releases:
- firefly - firefly
- giant - giant
- hammer - hammer
- infernalis
# Use the option below to specify your applicable package tree, eg. when using non-LTS Ubuntu versions # Use the option below to specify your applicable package tree, eg. when using non-LTS Ubuntu versions
# # for a list of available Debian distributions, visit http://ceph.com/debian-{{ ceph_stable_release }}/dists/ # # for a list of available Debian distributions, visit http://ceph.com/debian-{{ ceph_stable_release }}/dists/

View File

@ -36,13 +36,6 @@
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when: not ceph_stable_rh_storage when: not ceph_stable_rh_storage
# include Infernalis in the set of releases that do not have
# a separate ceph-mon package or ceph-osd package
# Note: Red Hat Ceph Storage is different, DOES separate them even in hammer
- set_fact: >
ceph_stable_rel_pkg="{{ ceph_stable_releases | union([ 'infernalis' ]) }}"
- name: install distro or red hat storage ceph mon - name: install distro or red hat storage ceph mon
yum: yum:
name: "{{ item }}" name: "{{ item }}"
@ -52,7 +45,7 @@
- ceph-mon - ceph-mon
when: when:
(ceph_origin == "distro" or ceph_stable_rh_storage or (ceph_origin == "distro" or ceph_stable_rh_storage or
(ceph_stable and ceph_stable_release not in ceph_stable_rel_pkg)) and (ceph_stable and ceph_stable_release not in ceph_stable_releases)) and
mon_group_name in group_names and mon_group_name in group_names and
ansible_pkg_mgr == "yum" ansible_pkg_mgr == "yum"
@ -65,7 +58,7 @@
- ceph-mon - ceph-mon
when: when:
(ceph_origin == "distro" or ceph_stable_rh_storage or (ceph_origin == "distro" or ceph_stable_rh_storage or
(ceph_stable and ceph_stable_release not in ceph_stable_rel_pkg)) and (ceph_stable and ceph_stable_release not in ceph_stable_releases)) and
mon_group_name in group_names and mon_group_name in group_names and
ansible_pkg_mgr == "dnf" ansible_pkg_mgr == "dnf"
@ -78,7 +71,7 @@
- ceph-osd - ceph-osd
when: when:
(ceph_origin == "distro" or ceph_stable_rh_storage or (ceph_origin == "distro" or ceph_stable_rh_storage or
(ceph_stable and ceph_stable_release not in ceph_stable_rel_pkg)) and (ceph_stable and ceph_stable_release not in ceph_stable_releases)) and
osd_group_name in group_names and osd_group_name in group_names and
ansible_pkg_mgr == "yum" ansible_pkg_mgr == "yum"
@ -91,7 +84,7 @@
- ceph-osd - ceph-osd
when: when:
(ceph_origin == "distro" or ceph_stable_rh_storage or (ceph_origin == "distro" or ceph_stable_rh_storage or
(ceph_stable and ceph_stable_release not in ceph_stable_rel_pkg)) and (ceph_stable and ceph_stable_release not in ceph_stable_releases)) and
osd_group_name in group_names and osd_group_name in group_names and
ansible_pkg_mgr == "dnf" ansible_pkg_mgr == "dnf"

View File

@ -64,24 +64,19 @@
tags: tags:
- package-install - package-install
- name: get ceph rhcs version - name: get ceph version
shell: rpm -q --qf "%{version}\n" ceph-common | cut -f1,2 -d '.' command: ceph --version
changed_when: false changed_when: false
failed_when: false register: ceph_version
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', '>'))) }}
- set_fact: - set_fact:
is_ceph_infernalis=True ceph_version: "{{ ceph_version.stdout.split(' ')[2] }}"
when:
ansible_os_family == 'Debian' and # NOTE (leseb/jsaintrocc): Your supposed to qoute variables
ceph_stable_rh_storage # 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 | version_compare('9.2.0', '>=') }}
- set_fact: - set_fact:
dir_owner: ceph dir_owner: ceph

View File

@ -9,9 +9,9 @@
- cephfs_data - cephfs_data
- cephfs_metadata - cephfs_metadata
changed_when: false changed_when: false
when: not {{ ceph_version.stdout | version_compare('0.84', '<') }} when: not {{ ceph_version | version_compare('0.84.0', '<') }}
- name: create ceph filesystem - name: create ceph filesystem
command: ceph --cluster {{ cluster }} fs new {{ cephfs }} {{ cephfs_metadata }} {{ cephfs_data }} command: ceph --cluster {{ cluster }} fs new {{ cephfs }} {{ cephfs_metadata }} {{ cephfs_data }}
changed_when: false changed_when: false
when: not {{ ceph_version.stdout | version_compare('0.84', '<') }} when: not {{ ceph_version | version_compare('0.84.0', '<') }}

View File

@ -2,11 +2,11 @@
- name: collect all the pools - name: collect all the pools
command: rados --cluster {{ cluster }} lspools command: rados --cluster {{ cluster }} lspools
register: ceph_pools register: ceph_pools
when: "{{ ceph_version.stdout | version_compare('0.94', '>=') }}" when: "{{ ceph_version | version_compare('0.94.0', '>=') }}"
- name: secure the cluster - name: secure the cluster
command: ceph --cluster {{ cluster }} osd pool set {{ item[0] }} {{ item[1] }} true command: ceph --cluster {{ cluster }} osd pool set {{ item[0] }} {{ item[1] }} true
with_nested: with_nested:
- ceph_pools.stdout_lines - ceph_pools.stdout_lines
- secure_cluster_flags - secure_cluster_flags
when: "{{ ceph_version.stdout | version_compare('0.94', '>=') }}" when: "{{ ceph_version | version_compare('0.94.0', '>=') }}"

View File

@ -53,9 +53,3 @@
changed_when: false changed_when: false
failed_when: false failed_when: false
when: cephx when: cephx
- name: get ceph monitor version
shell: ceph --cluster {{ cluster }} daemon mon."{{ monitor_name }}" version | cut -d '"' -f 4 | cut -f 1,2 -d '.'
changed_when: false
failed_when: "'No such file or directory' in ceph_version.stderr"
register: ceph_version