From 087d3a3371c8a9d16b63687b054dd5810e4b1594 Mon Sep 17 00:00:00 2001 From: Teoman ONAY Date: Tue, 16 Jan 2024 11:40:07 +0100 Subject: [PATCH] bump ansible-core to <2.16 - Remove python3 shebangs - command module warn parameter is deprecated since 2.11 and removed from 2.14 Signed-off-by: Teoman ONAY --- infrastructure-playbooks/purge-cluster.yml | 8 -------- library/ceph_pool.py | 2 -- requirements.txt | 2 +- .../installs/configure_redhat_repository_installation.yml | 2 -- roles/ceph-infra/tasks/configure_firewall.yml | 2 -- roles/ceph-rgw/tasks/openstack-keystone.yml | 2 -- roles/ceph-validate/tasks/check_system.yml | 4 ++-- tests/requirements.txt | 4 ++-- 8 files changed, 5 insertions(+), 21 deletions(-) diff --git a/infrastructure-playbooks/purge-cluster.yml b/infrastructure-playbooks/purge-cluster.yml index c992f9468c..747ecbc912 100644 --- a/infrastructure-playbooks/purge-cluster.yml +++ b/infrastructure-playbooks/purge-cluster.yml @@ -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: diff --git a/library/ceph_pool.py b/library/ceph_pool.py index 9451a71c39..c04cd1eb14 100644 --- a/library/ceph_pool.py +++ b/library/ceph_pool.py @@ -1,5 +1,3 @@ -#!/usr/bin/python3 - # Copyright 2020, Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/requirements.txt b/requirements.txt index 4ed60d62d3..31a81e569d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ # These are Python requirements needed to run ceph-ansible main -ansible-core>=2.12,<2.13 +ansible-core<2.16 netaddr six diff --git a/roles/ceph-common/tasks/installs/configure_redhat_repository_installation.yml b/roles/ceph-common/tasks/installs/configure_redhat_repository_installation.yml index a36355a1bb..839b0fad96 100644 --- a/roles/ceph-common/tasks/installs/configure_redhat_repository_installation.yml +++ b/roles/ceph-common/tasks/installs/configure_redhat_repository_installation.yml @@ -18,7 +18,5 @@ # Remove yum caches so yum doesn't get confused if we are reinstalling a different ceph version - name: purge yum cache command: yum clean all - args: - warn: no changed_when: false when: ansible_facts['pkg_mgr'] == 'yum' diff --git a/roles/ceph-infra/tasks/configure_firewall.yml b/roles/ceph-infra/tasks/configure_firewall.yml index 54dbc4ffdb..7469584bfb 100644 --- a/roles/ceph-infra/tasks/configure_firewall.yml +++ b/roles/ceph-infra/tasks/configure_firewall.yml @@ -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 diff --git a/roles/ceph-rgw/tasks/openstack-keystone.yml b/roles/ceph-rgw/tasks/openstack-keystone.yml index acfe50bb4e..d216ee15e3 100644 --- a/roles/ceph-rgw/tasks/openstack-keystone.yml +++ b/roles/ceph-rgw/tasks/openstack-keystone.yml @@ -25,8 +25,6 @@ - name: create nss entries for keystone certificates shell: "{{ item }}" - args: - warn: no changed_when: false with_items: - "openssl x509 -in /etc/keystone/ssl/certs/ca.pem -pubkey | certutil -d {{ radosgw_nss_db_path }} -A -n ca -t 'TCu,Cu,Tuw'" diff --git a/roles/ceph-validate/tasks/check_system.yml b/roles/ceph-validate/tasks/check_system.yml index d404530249..c7bc88879f 100644 --- a/roles/ceph-validate/tasks/check_system.yml +++ b/roles/ceph-validate/tasks/check_system.yml @@ -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.15!" + when: ansible_version.minor|int != 15 - name: fail on unsupported system fail: diff --git a/tests/requirements.txt b/tests/requirements.txt index 2ed780f6d7..915b4c69a8 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -2,8 +2,8 @@ pytest-testinfra pytest-xdist pytest -ansible-core>=2.12,<2.13,!=2.9.10 -Jinja2>=2.10 +ansible-core<2.16 +Jinja2 netaddr mock jmespath