mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #664 from jsaintrocc/master
Add infernalis to list of stable releases commentpull/719/head
commit
f950afef92
|
@ -90,6 +90,7 @@ dummy:
|
|||
# - firefly
|
||||
# - giant
|
||||
# - hammer
|
||||
# - infernalis
|
||||
|
||||
# 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/
|
||||
|
|
|
@ -82,6 +82,7 @@ ceph_stable_releases:
|
|||
- firefly
|
||||
- giant
|
||||
- hammer
|
||||
- infernalis
|
||||
|
||||
# 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/
|
||||
|
|
|
@ -36,13 +36,6 @@
|
|||
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
||||
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
|
||||
yum:
|
||||
name: "{{ item }}"
|
||||
|
@ -52,7 +45,7 @@
|
|||
- ceph-mon
|
||||
when:
|
||||
(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
|
||||
ansible_pkg_mgr == "yum"
|
||||
|
||||
|
@ -65,7 +58,7 @@
|
|||
- ceph-mon
|
||||
when:
|
||||
(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
|
||||
ansible_pkg_mgr == "dnf"
|
||||
|
||||
|
@ -78,7 +71,7 @@
|
|||
- ceph-osd
|
||||
when:
|
||||
(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
|
||||
ansible_pkg_mgr == "yum"
|
||||
|
||||
|
@ -91,7 +84,7 @@
|
|||
- ceph-osd
|
||||
when:
|
||||
(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
|
||||
ansible_pkg_mgr == "dnf"
|
||||
|
||||
|
|
|
@ -64,24 +64,19 @@
|
|||
tags:
|
||||
- package-install
|
||||
|
||||
- name: get ceph rhcs version
|
||||
shell: rpm -q --qf "%{version}\n" ceph-common | cut -f1,2 -d '.'
|
||||
- name: get ceph version
|
||||
command: ceph --version
|
||||
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
|
||||
|
||||
- set_fact:
|
||||
is_ceph_infernalis=True
|
||||
when:
|
||||
ansible_os_family == 'Debian' and
|
||||
ceph_stable_rh_storage
|
||||
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 | version_compare('9.2.0', '>=') }}
|
||||
|
||||
- set_fact:
|
||||
dir_owner: ceph
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
- cephfs_data
|
||||
- cephfs_metadata
|
||||
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
|
||||
command: ceph --cluster {{ cluster }} fs new {{ cephfs }} {{ cephfs_metadata }} {{ cephfs_data }}
|
||||
changed_when: false
|
||||
when: not {{ ceph_version.stdout | version_compare('0.84', '<') }}
|
||||
when: not {{ ceph_version | version_compare('0.84.0', '<') }}
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
- name: collect all the pools
|
||||
command: rados --cluster {{ cluster }} lspools
|
||||
register: ceph_pools
|
||||
when: "{{ ceph_version.stdout | version_compare('0.94', '>=') }}"
|
||||
when: "{{ ceph_version | version_compare('0.94.0', '>=') }}"
|
||||
|
||||
- name: secure the cluster
|
||||
command: ceph --cluster {{ cluster }} osd pool set {{ item[0] }} {{ item[1] }} true
|
||||
with_nested:
|
||||
- ceph_pools.stdout_lines
|
||||
- secure_cluster_flags
|
||||
when: "{{ ceph_version.stdout | version_compare('0.94', '>=') }}"
|
||||
when: "{{ ceph_version | version_compare('0.94.0', '>=') }}"
|
||||
|
|
|
@ -53,9 +53,3 @@
|
|||
changed_when: false
|
||||
failed_when: false
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue