mirror of https://github.com/ceph/ceph-ansible.git
add CentOS stream 9 support
This adds the resquired changes in order to support CentOS stream 9. Also, this bumps the Ansible version support to 2.15 Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>pull/7474/head
parent
a9d1ec844d
commit
7909778d0e
|
@ -10,7 +10,7 @@ jobs:
|
|||
with:
|
||||
python-version: '3.8'
|
||||
architecture: x64
|
||||
- run: pip install -r <(grep ansible tests/requirements.txt) ansible-lint==4.3.7 'rich>=9.5.1,<11.0.0' netaddr
|
||||
- run: pip install -r <(grep ansible tests/requirements.txt) ansible-lint==6.16.0 netaddr
|
||||
- run: ansible-galaxy install -r requirements.yml
|
||||
- run: ansible-lint -x 106,204,205,208 -v --force-color ./roles/*/ ./infrastructure-playbooks/*.yml site-container.yml.sample site-container.yml.sample dashboard.yml
|
||||
- run: ansible-playbook -i ./tests/functional/all_daemons/hosts site.yml.sample --syntax-check --list-tasks -vv
|
||||
|
|
|
@ -15,8 +15,8 @@ Obsoletes: ceph-iscsi-ansible <= 1.5
|
|||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: ansible >= 2.9
|
||||
Requires: ansible >= 2.9
|
||||
BuildRequires: ansible-core >= 2.14
|
||||
Requires: ansible-core >= 2.14
|
||||
|
||||
%if 0%{?rhel} == 7
|
||||
BuildRequires: python2-devel
|
||||
|
|
|
@ -12,6 +12,10 @@
|
|||
gather_facts: false
|
||||
become: true
|
||||
pre_tasks:
|
||||
- import_role:
|
||||
name: ceph-defaults
|
||||
tags: ['ceph_update_config']
|
||||
|
||||
- name: set ceph node exporter install 'In Progress'
|
||||
run_once: true
|
||||
set_stats:
|
||||
|
@ -21,9 +25,6 @@
|
|||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||
|
||||
tasks:
|
||||
- import_role:
|
||||
name: ceph-defaults
|
||||
tags: ['ceph_update_config']
|
||||
- import_role:
|
||||
name: ceph-facts
|
||||
tags: ['ceph_update_config']
|
||||
|
@ -47,10 +48,14 @@
|
|||
status: "Complete"
|
||||
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||
|
||||
- hosts: "{{ monitoring_group_name }}"
|
||||
- hosts: "{{ monitoring_group_name | default('monitoring') }}"
|
||||
gather_facts: false
|
||||
become: true
|
||||
pre_tasks:
|
||||
- import_role:
|
||||
name: ceph-defaults
|
||||
tags: ['ceph_update_config']
|
||||
|
||||
- name: set ceph grafana install 'In Progress'
|
||||
run_once: true
|
||||
set_stats:
|
||||
|
@ -60,9 +65,6 @@
|
|||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||
|
||||
tasks:
|
||||
- import_role:
|
||||
name: ceph-defaults
|
||||
tags: ['ceph_update_config']
|
||||
- import_role:
|
||||
name: ceph-facts
|
||||
tags: ['ceph_update_config']
|
||||
|
@ -86,10 +88,14 @@
|
|||
|
||||
# using groups[] here otherwise it can't fallback to the mon if there's no mgr group.
|
||||
# adding an additional | default(omit) in case where no monitors are present (external ceph cluster)
|
||||
- hosts: "{{ groups[mgr_group_name] | default(groups[mon_group_name]) | default(omit) }}"
|
||||
- hosts: "{{ groups[mgr_group_name|default('mgrs')] | default(groups[mon_group_name|default('mons')]) | default(omit) }}"
|
||||
gather_facts: false
|
||||
become: true
|
||||
pre_tasks:
|
||||
- import_role:
|
||||
name: ceph-defaults
|
||||
tags: ['ceph_update_config']
|
||||
|
||||
- name: set ceph dashboard install 'In Progress'
|
||||
run_once: true
|
||||
set_stats:
|
||||
|
@ -99,9 +105,6 @@
|
|||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||
|
||||
tasks:
|
||||
- import_role:
|
||||
name: ceph-defaults
|
||||
tags: ['ceph_update_config']
|
||||
- import_role:
|
||||
name: ceph-facts
|
||||
tags: ['ceph_update_config']
|
||||
|
|
|
@ -1000,13 +1000,9 @@
|
|||
|
||||
- name: remove package dependencies on redhat
|
||||
command: yum -y autoremove
|
||||
args:
|
||||
warn: no
|
||||
|
||||
- name: remove package dependencies on redhat again
|
||||
command: yum -y autoremove
|
||||
args:
|
||||
warn: no
|
||||
when:
|
||||
ansible_facts['pkg_mgr'] == "yum"
|
||||
|
||||
|
@ -1019,13 +1015,9 @@
|
|||
|
||||
- name: remove package dependencies on redhat
|
||||
command: dnf -y autoremove
|
||||
args:
|
||||
warn: no
|
||||
|
||||
- name: remove package dependencies on redhat again
|
||||
command: dnf -y autoremove
|
||||
args:
|
||||
warn: no
|
||||
when:
|
||||
ansible_facts['pkg_mgr'] == "dnf"
|
||||
when:
|
||||
|
|
|
@ -148,6 +148,8 @@
|
|||
become: True
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- import_role:
|
||||
name: ceph-defaults
|
||||
- name: upgrade ceph mon cluster
|
||||
block:
|
||||
- name: remove ceph aliases
|
||||
|
@ -169,8 +171,6 @@
|
|||
set_fact:
|
||||
mon_host: "{{ groups[mon_group_name] | difference([inventory_hostname]) | last }}"
|
||||
|
||||
- import_role:
|
||||
name: ceph-defaults
|
||||
- import_role:
|
||||
name: ceph-facts
|
||||
|
||||
|
@ -305,6 +305,9 @@
|
|||
delay: "{{ health_mon_check_delay }}"
|
||||
when: containerized_deployment | bool
|
||||
rescue:
|
||||
- import_role:
|
||||
name: ceph-defaults
|
||||
|
||||
- name: unmask the mon service
|
||||
systemd:
|
||||
name: ceph-mon@{{ ansible_facts['hostname'] }}
|
||||
|
@ -1112,7 +1115,7 @@
|
|||
name: ceph-node-exporter
|
||||
|
||||
- name: upgrade monitoring node
|
||||
hosts: "{{ monitoring_group_name }}"
|
||||
hosts: "{{ monitoring_group_name|default('monitoring') }}"
|
||||
tags: monitoring
|
||||
gather_facts: false
|
||||
become: true
|
||||
|
@ -1144,7 +1147,7 @@
|
|||
name: ceph-grafana
|
||||
|
||||
- name: upgrade ceph dashboard
|
||||
hosts: "{{ groups[mgr_group_name] | default(groups[mon_group_name]) | default(omit) }}"
|
||||
hosts: "{{ groups[mgr_group_name|default('mgrs')] | default(groups[mon_group_name|default('mons')]) | default(omit) }}"
|
||||
tags: monitoring
|
||||
gather_facts: false
|
||||
become: true
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# These are Python requirements needed to run ceph-ansible main
|
||||
ansible-core>=2.12,<2.13
|
||||
ansible-core>=2.14,<2.15,!=2.9.10
|
||||
netaddr
|
||||
six
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
container_package_name: podman
|
||||
container_service_name: podman
|
|
@ -6,5 +6,5 @@
|
|||
|
||||
- name: set_fact container_binary
|
||||
set_fact:
|
||||
container_binary: "{{ 'podman' if (podman_binary.stat.exists and ansible_facts['distribution'] == 'Fedora') or (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] == '8') else 'docker' }}"
|
||||
when: not docker2podman | default(false) | bool
|
||||
container_binary: "{{ 'podman' if (podman_binary.stat.exists and ansible_facts['distribution'] == 'Fedora') or (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] in ['8', '9']) else 'docker' }}"
|
||||
when: not docker2podman | default(false) | bool
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
---
|
||||
- name: check firewalld installation on redhat or SUSE/openSUSE
|
||||
command: rpm -q firewalld
|
||||
args:
|
||||
warn: no
|
||||
register: firewalld_pkg_query
|
||||
ignore_errors: true
|
||||
check_mode: no
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
- name: fail on unsupported ansible version
|
||||
fail:
|
||||
msg: "Ansible version must be 2.12!"
|
||||
when: ansible_version.minor|int != 12
|
||||
msg: "Ansible version must be 2.14!"
|
||||
when: ansible_version.minor|int != 14
|
||||
|
||||
- name: fail on unsupported system
|
||||
fail:
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
|
||||
tasks:
|
||||
# pre-tasks for following import -
|
||||
- import_role:
|
||||
name: ceph-defaults
|
||||
- name: gather facts
|
||||
setup:
|
||||
gather_subset:
|
||||
|
@ -56,8 +58,6 @@
|
|||
when: delegate_facts_host | bool
|
||||
tags: always
|
||||
|
||||
- import_role:
|
||||
name: ceph-defaults
|
||||
|
||||
# dummy container setup is only supported on x86_64
|
||||
# when running with containerized_deployment: true this task
|
||||
|
@ -503,7 +503,7 @@
|
|||
|
||||
- name: set_fact container_binary
|
||||
set_fact:
|
||||
container_binary: "{{ 'podman' if (podman_binary.stat.exists and ansible_facts['distribution'] == 'Fedora') or (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] == '8') else 'docker' }}"
|
||||
container_binary: "{{ 'podman' if (podman_binary.stat.exists and ansible_facts['distribution'] == 'Fedora') or (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] in ['8', '9']) else 'docker' }}"
|
||||
|
||||
- name: get ceph status from the first monitor
|
||||
command: >
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
delegate_facts_host: True
|
||||
|
||||
pre_tasks:
|
||||
- import_role:
|
||||
name: ceph-defaults
|
||||
# If we can't get python2 installed before any module is used we will fail
|
||||
# so just try what we can to get it installed
|
||||
|
||||
|
@ -61,8 +63,6 @@
|
|||
when: delegate_facts_host | bool
|
||||
|
||||
tasks:
|
||||
- import_role:
|
||||
name: ceph-defaults
|
||||
|
||||
# dummy container setup is only supported on x86_64
|
||||
# when running with containerized_deployment: true this task
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
pytest-testinfra
|
||||
pytest-xdist
|
||||
pytest
|
||||
ansible-core>=2.12,<2.13,!=2.9.10
|
||||
ansible-core>=2.14,<2.15,!=2.9.10
|
||||
Jinja2>=2.10
|
||||
netaddr
|
||||
mock
|
||||
|
|
|
@ -22,7 +22,7 @@ setenv=
|
|||
# only available for ansible >= 2.5
|
||||
ANSIBLE_STDOUT_CALLBACK = yaml
|
||||
# Set the vagrant box image to use
|
||||
CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8
|
||||
CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
|
||||
|
||||
deps= -r{toxinidir}/tests/requirements.txt
|
||||
changedir= {toxinidir}/tests/functional/cephadm
|
||||
|
|
|
@ -21,8 +21,8 @@ setenv=
|
|||
ANSIBLE_STDOUT_CALLBACK = yaml
|
||||
# non_container: DEV_SETUP = True
|
||||
# Set the vagrant box image to use
|
||||
centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8
|
||||
centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8
|
||||
centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
|
||||
centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
|
||||
|
||||
container: CONTAINER_DIR = /container
|
||||
container: PLAYBOOK = site-container.yml.sample
|
||||
|
|
|
@ -22,7 +22,7 @@ setenv=
|
|||
# only available for ansible >= 2.5
|
||||
ANSIBLE_STDOUT_CALLBACK = yaml
|
||||
# Set the vagrant box image to use
|
||||
CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8
|
||||
CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
|
||||
|
||||
# Set the ansible inventory host file to be used according to which distrib we are running on
|
||||
INVENTORY = {env:_INVENTORY:hosts}
|
||||
|
|
|
@ -21,8 +21,8 @@ setenv=
|
|||
ANSIBLE_STDOUT_CALLBACK = yaml
|
||||
# non_container: DEV_SETUP = True
|
||||
# Set the vagrant box image to use
|
||||
centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8
|
||||
centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8
|
||||
centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
|
||||
centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
|
||||
|
||||
INVENTORY = {env:_INVENTORY:hosts}
|
||||
container: CONTAINER_DIR = /container
|
||||
|
|
|
@ -62,8 +62,8 @@ setenv=
|
|||
ANSIBLE_STDOUT_CALLBACK = yaml
|
||||
non_container: DEV_SETUP = True
|
||||
# Set the vagrant box image to use
|
||||
centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8
|
||||
centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8
|
||||
centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
|
||||
centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
|
||||
INVENTORY = {env:_INVENTORY:hosts}
|
||||
container: CONTAINER_DIR = /container
|
||||
container: PLAYBOOK = site-container.yml.sample
|
||||
|
|
|
@ -21,8 +21,8 @@ setenv=
|
|||
ANSIBLE_STDOUT_CALLBACK = yaml
|
||||
# non_container: DEV_SETUP = True
|
||||
# Set the vagrant box image to use
|
||||
centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8
|
||||
centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8
|
||||
centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
|
||||
centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
|
||||
|
||||
INVENTORY = {env:_INVENTORY:hosts}
|
||||
container: CONTAINER_DIR = /container
|
||||
|
|
|
@ -21,8 +21,8 @@ setenv=
|
|||
ANSIBLE_STDOUT_CALLBACK = yaml
|
||||
# non_container: DEV_SETUP = True
|
||||
# Set the vagrant box image to use
|
||||
centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8
|
||||
centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8
|
||||
centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
|
||||
centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
|
||||
|
||||
INVENTORY = {env:_INVENTORY:hosts}
|
||||
container: CONTAINER_DIR = /container
|
||||
|
|
4
tox.ini
4
tox.ini
|
@ -313,8 +313,8 @@ setenv=
|
|||
ANSIBLE_STDOUT_CALLBACK = yaml
|
||||
non_container: DEV_SETUP = True
|
||||
# Set the vagrant box image to use
|
||||
centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8
|
||||
centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8
|
||||
centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
|
||||
centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
|
||||
INVENTORY = {env:_INVENTORY:hosts}
|
||||
container: CONTAINER_DIR = /container
|
||||
container: PLAYBOOK = site-container.yml.sample
|
||||
|
|
Loading…
Reference in New Issue