diff --git a/group_vars/all.sample b/group_vars/all.sample index aa62b98c8..132325ee0 100644 --- a/group_vars/all.sample +++ b/group_vars/all.sample @@ -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/ diff --git a/roles/ceph-common/defaults/main.yml b/roles/ceph-common/defaults/main.yml index 689628d6f..d235453cd 100644 --- a/roles/ceph-common/defaults/main.yml +++ b/roles/ceph-common/defaults/main.yml @@ -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/ diff --git a/roles/ceph-common/tasks/installs/install_on_redhat.yml b/roles/ceph-common/tasks/installs/install_on_redhat.yml index 45446e4ac..cfad880da 100644 --- a/roles/ceph-common/tasks/installs/install_on_redhat.yml +++ b/roles/ceph-common/tasks/installs/install_on_redhat.yml @@ -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" diff --git a/roles/ceph-common/tasks/main.yml b/roles/ceph-common/tasks/main.yml index e43b62a85..b297c57cb 100644 --- a/roles/ceph-common/tasks/main.yml +++ b/roles/ceph-common/tasks/main.yml @@ -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 diff --git a/roles/ceph-mon/tasks/create_mds_filesystems.yml b/roles/ceph-mon/tasks/create_mds_filesystems.yml index 7194312d1..fd34f6d05 100644 --- a/roles/ceph-mon/tasks/create_mds_filesystems.yml +++ b/roles/ceph-mon/tasks/create_mds_filesystems.yml @@ -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', '<') }} diff --git a/roles/ceph-mon/tasks/secure_cluster.yml b/roles/ceph-mon/tasks/secure_cluster.yml index 8227cdc8a..5ee48ca5e 100644 --- a/roles/ceph-mon/tasks/secure_cluster.yml +++ b/roles/ceph-mon/tasks/secure_cluster.yml @@ -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', '>=') }}" diff --git a/roles/ceph-mon/tasks/start_monitor.yml b/roles/ceph-mon/tasks/start_monitor.yml index 9d907b3fa..529a2591f 100644 --- a/roles/ceph-mon/tasks/start_monitor.yml +++ b/roles/ceph-mon/tasks/start_monitor.yml @@ -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