Skip to content

Commit 1065dec

Browse files
committed
Test 2 major ansible versions
We keep testing Ansible 8.x in CentOS Stream 9, while we start testing Ansible 9.x in ubuntu and debian. This is mainly because in CentOS Stream 9 we have Python 3.9 but Ansible 9 requires at least Python 3.10. Change-Id: If2fcae6eb3d00a7488fd237ae155c337c0747e20
1 parent 50a0b4c commit 1065dec

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
upgrade:
3+
- |
4+
Start testing and supporting Ansible 9.x in parallel with Ansible 8.x

scripts/env-setup.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ set -euo pipefail
55
. $(dirname $0)/install-deps.sh
66
# NOTE(pas-ha) the above exports some useful variables like
77
# $PYTHON , $PIP and $VENV depending on venv install or not
8-
9-
DEFAULT_PIP_ANSIBLE='>=8,<9'
8+
source /etc/os-release
9+
if [[ $ID == "centos" ]] || [[ $VERSION_CODENAME == "bullseye" ]]; then
10+
DEFAULT_PIP_ANSIBLE='>=8,<9'
11+
elif [[ $ID == "ubuntu" ]] || [[ $VERSION_CODENAME == "bookworm" ]] ; then
12+
DEFAULT_PIP_ANSIBLE='>=9,<10'
13+
fi
1014

1115
ANSIBLE_COLLECTIONS_REQ=${ANSIBLE_COLLECTIONS_REQ:-$(dirname $0)/../ansible-collections-requirements.yml}
1216
ANSIBLE_COLLECTION_SOURCE_PATH=

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ filename = *.py
7979
[testenv:linters]
8080
allowlist_externals = bash
8181
deps =
82-
ansible>=8,<9
83-
ansible-lint>=6,<7
82+
ansible>=9,<10
83+
ansible-lint>=24,<25
8484
commands =
8585
bash tools/ansible-lint.sh
8686

0 commit comments

Comments
 (0)