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
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
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:
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']
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:
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']
# 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:
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']
- 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"
- 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:
become: True
gather_facts: false
tasks:
+ - import_role:
+ name: ceph-defaults
- name: upgrade ceph mon cluster
block:
- name: remove ceph aliases
set_fact:
mon_host: "{{ groups[mon_group_name] | difference([inventory_hostname]) | last }}"
- - import_role:
- name: ceph-defaults
- import_role:
name: ceph-facts
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'] }}
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
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
# 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
--- /dev/null
+---
+container_package_name: podman
+container_service_name: podman
- 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
\ No newline at end of file
+ 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
---
- 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
- 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:
tasks:
# pre-tasks for following import -
+ - import_role:
+ name: ceph-defaults
- name: gather facts
setup:
gather_subset:
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
- 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: >
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
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
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
# 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
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
# 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}
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
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
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
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
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