From 72ad77f91470f84dcd35fdb7360a5c4e83334878 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Thu, 21 Oct 2021 08:07:22 +0200 Subject: [PATCH] Bump up Ansible to 4.x As per [1] and [2] - Ansible versions prior to 4 are not maintained. [1]: https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html#ansible-community-package-release-cycle [2]: https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html#ansible-core-release-cycle Change-Id: I06cf6723361010e0a7c6eb07f2d9e570192cd9a4 --- releasenotes/notes/ansible-4-1e08eb3acd1768fe.yaml | 4 ++++ scripts/env-setup.sh | 3 ++- tox.ini | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/ansible-4-1e08eb3acd1768fe.yaml diff --git a/releasenotes/notes/ansible-4-1e08eb3acd1768fe.yaml b/releasenotes/notes/ansible-4-1e08eb3acd1768fe.yaml new file mode 100644 index 000000000..b3870e3d2 --- /dev/null +++ b/releasenotes/notes/ansible-4-1e08eb3acd1768fe.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Ansible 4 is now supported and used by default. diff --git a/scripts/env-setup.sh b/scripts/env-setup.sh index 8d2db7c83..5afa97f48 100755 --- a/scripts/env-setup.sh +++ b/scripts/env-setup.sh @@ -6,7 +6,7 @@ set -euo pipefail # NOTE(pas-ha) the above exports some useful variables like # $PYTHON , $PIP and $VENV depending on venv install or not -DEFAULT_PIP_ANSIBLE='>=2.9,<2.11' +DEFAULT_PIP_ANSIBLE='>=4,<5' ANSIBLE_COLLECTIONS_REQ=${ANSIBLE_COLLECTIONS_REQ:-$(dirname $0)/../ansible-collections-requirements.yml} ANSIBLE_COLLECTION_SOURCE_PATH= @@ -25,6 +25,7 @@ ANSIBLE=${VENV}/bin/ansible if [ -f "$ANSIBLE" ]; then ${PIP} uninstall -y ansible ${PIP} uninstall -y ansible-base + ${PIP} uninstall -y ansible-core fi ${PIP} install "${ANSIBLE_SOURCE_PATH}" diff --git a/tox.ini b/tox.ini index 27ade6987..19b6fe335 100644 --- a/tox.ini +++ b/tox.ini @@ -86,7 +86,7 @@ deps = usedevelop = False allowlist_externals = bash deps = - ansible>=2.10.0,<2.11 + ansible>=4,<5 ansible-lint>=4.3.0,<5 commands = bash tools/ansible-lint.sh