The CentOS 7 distribution could still be used be deploying ceph if
- it's a containerized deployment
- it's a non containerized deployment without the dashboard (due to
missing python3 libraries).
The ceph_stable_redhat_distro variable has been remove because we can
rely on the ansible_distribution_major_version fact instead.
The copr el8 repository configuration is only applied for CentOS 8.
The ceph-mgr-dashboard package is only installed when the
dashboard_enabled variable is set to true.
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit
2547ab601a5187251f9dd41246d3dcedb653030f)
#centos_package_dependencies:
# - epel-release
-# - python3-libselinux
+# - "{{ 'python3-libselinux' if ansible_distribution_major_version | int >= 8 else 'libselinux-python' }}"
#redhat_package_dependencies: []
# for more info read: https://github.com/ceph/ceph-ansible/issues/305
#ceph_stable_distro_source: "{{ ansible_distribution_release }}"
-# This option is needed for _both_ stable and dev version, so please always fill the right version
-# # for supported distros, see http://download.ceph.com/rpm-{{ ceph_stable_release }}/
-#ceph_stable_redhat_distro: el8
-
# REPOSITORY: RHCS VERSION RED HAT STORAGE (from 5.0)
#
# Ceph mgr packages to install, ceph-mgr + extra module packages.
#ceph_mgr_packages:
# - ceph-mgr
-# - ceph-mgr-dashboard
-# - ceph-mgr-diskprediction-local
##########
#centos_package_dependencies:
# - epel-release
-# - python3-libselinux
+# - "{{ 'python3-libselinux' if ansible_distribution_major_version | int >= 8 else 'libselinux-python' }}"
#redhat_package_dependencies: []
# for more info read: https://github.com/ceph/ceph-ansible/issues/305
#ceph_stable_distro_source: "{{ ansible_distribution_release }}"
-# This option is needed for _both_ stable and dev version, so please always fill the right version
-# # for supported distros, see http://download.ceph.com/rpm-{{ ceph_stable_release }}/
-#ceph_stable_redhat_distro: el8
-
# REPOSITORY: RHCS VERSION RED HAT STORAGE (from 5.0)
#
---
+- name: install dnf-plugins-core
+ package:
+ name: dnf-plugins-core
+ register: result
+ until: result is succeeded
+ tags: with_pkg
+
- name: enable ceph-el8 copr
command: dnf copr enable -y ktdreyer/ceph-el8
args:
---
- name: include configure_el8_dep.yml
include_tasks: configure_el8_dep.yml
- when: ceph_origin == 'repository'
+ when:
+ - ceph_origin == 'repository'
+ - ansible_distribution_major_version | int == 8
- name: include configure_redhat_repository_installation.yml
include_tasks: configure_redhat_repository_installation.yml
gpgcheck: yes
state: present
gpgkey: "{{ ceph_stable_key }}"
- baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/$basearch"
+ baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}/el{{ ansible_distribution_major_version }}/$basearch"
file: ceph_stable
priority: 2
register: result
gpgcheck: yes
state: present
gpgkey: "{{ ceph_stable_key }}"
- baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/noarch"
+ baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}/el{{ ansible_distribution_major_version }}/noarch"
file: ceph_stable
priority: 2
register: result
---
-- name: install dnf-plugins-core
- package:
- name: dnf-plugins-core
- register: result
- until: result is succeeded
- tags: with_pkg
-
- name: fetch ceph red hat development repository
uri:
# Use the centos repo since we don't currently have a dedicated red hat repo
centos_package_dependencies:
- epel-release
- - python3-libselinux
+ - "{{ 'python3-libselinux' if ansible_distribution_major_version | int >= 8 else 'libselinux-python' }}"
redhat_package_dependencies: []
# for more info read: https://github.com/ceph/ceph-ansible/issues/305
#ceph_stable_distro_source: "{{ ansible_distribution_release }}"
-# This option is needed for _both_ stable and dev version, so please always fill the right version
-# # for supported distros, see http://download.ceph.com/rpm-{{ ceph_stable_release }}/
-ceph_stable_redhat_distro: el8
-
# REPOSITORY: RHCS VERSION RED HAT STORAGE (from 5.0)
#
# Ceph mgr packages to install, ceph-mgr + extra module packages.
ceph_mgr_packages:
- ceph-mgr
- - ceph-mgr-dashboard
- - ceph-mgr-diskprediction-local
##########
---
- name: append dashboard modules to ceph_mgr_modules
set_fact:
- ceph_mgr_modules: "{{ (ceph_mgr_modules + [ 'dashboard', 'prometheus' ]) | unique }}"
+ ceph_mgr_modules: "{{ ceph_mgr_modules | union(['dashboard', 'prometheus']) }}"
when: dashboard_enabled | bool
- name: wait for all mgr to be up
- dashboard_enabled | bool
- ansible_distribution == 'RedHat'
+- name: set_fact ceph_mgr_packages for dashboard
+ set_fact:
+ ceph_mgr_packages: "{{ ceph_mgr_packages | union(['ceph-mgr-dashboard']) }}"
+ when: dashboard_enabled | bool
+
+- name: set_fact ceph_mgr_packages for non el7 distribution
+ set_fact:
+ ceph_mgr_packages: "{{ ceph_mgr_packages | union(['ceph-mgr-diskprediction-local']) }}"
+ when:
+ - ansible_os_family != 'RedHat'
+ - ansible_distribution_major_version | int != 7
+
- name: install ceph-mgr packages on RedHat or SUSE
package:
name: '{{ ceph_mgr_packages }}'
- name: fail on unsupported CentOS release
fail:
- msg: "CentOS release not supported {{ ansible_distribution_major_version }}"
+ msg: "CentOS release not supported {{ ansible_distribution_major_version }} with dashboard"
when:
- ansible_distribution == 'CentOS'
- - ansible_distribution_major_version | int != 8
+ - ansible_distribution_major_version | int == 7
+ - not containerized_deployment | bool
+ - dashboard_enabled | true
- name: red hat based systems tasks
when:
@pytest.fixture(scope="module")
def setup(host):
cluster_address = ""
- container_binary = ""
osd_ids = []
osds = []
ansible_facts = host.ansible("setup")
docker = ansible_vars.get("docker")
+ container_binary = ansible_vars.get("container_binary", "")
osd_auto_discovery = ansible_vars.get("osd_auto_discovery")
group_names = ansible_vars["group_names"]
fsid = ansible_vars.get("fsid")
address = host.interface(public_interface).addresses[0]
- if docker:
+ if docker and not container_binary:
container_binary = "podman"
data = dict(
# this is only here to let the CI tests know
# that this scenario is using docker
docker: True
+container_binary: docker
containerized_deployment: True
monitor_interface: "{{ 'eth1' if ansible_distribution == 'CentOS' else 'ens6' }}"
- "{{ openstack_cinder_pool }}"
handler_health_mon_check_delay: 10
handler_health_osd_check_delay: 10
-dashboard_admin_password: $sX!cD$rYU6qR^B!
-grafana_admin_password: +xFRe+RES@7vg24n
\ No newline at end of file
+dashboard_enabled: false
\ No newline at end of file
[osds]
osd0
-[grafana-server]
-mon0
-
[mgrs]
mon0