mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-25 15:06:06 -03:30
Exercise multiple ansible versions in CI (#8172)
* Ansible: separate requirements files for supported ansible versions * Ansible: allow using ansible 2.11 * CI: Exercise Ansible 2.9 and Ansible 2.11 in a basic AIO CI job * CI: Allow running a reset test outside of idempotency tests and running it in stage1 * CI: move ubuntu18-calico-aio job to stage2 and relay only on ubuntu20 with the variously supported ansible versions for stage1 * CI: add capability to install collections or roles from ansible-galaxy to mitigate missing behavior in older ansible versions
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
|
||||
/usr/bin/python -m pip uninstall -y ansible
|
||||
/usr/bin/python -m pip install -r tests/requirements.txt
|
||||
: ${ANSIBLE_MAJOR_VERSION:=2.10}
|
||||
|
||||
/usr/bin/python -m pip uninstall -y ansible ansible-base ansible-core
|
||||
/usr/bin/python -m pip install -r tests/requirements-${ANSIBLE_MAJOR_VERSION}.txt
|
||||
mkdir -p /.ssh
|
||||
mkdir -p cluster-dump
|
||||
mkdir -p $HOME/.ssh
|
||||
ansible-playbook --version
|
||||
|
||||
# in some cases we may need to bring in collections or roles from ansible-galaxy
|
||||
# to compensate for missing functionality in older ansible versions
|
||||
if [ -f requirements-${ANSIBLE_MAJOR_VERSION}.yml ] ; then
|
||||
ansible-galaxy role install -r requirements-${ANSIBLE_MAJOR_VERSION}.yml
|
||||
ansible-galaxy collection install -r requirements-${ANSIBLE_MAJOR_VERSION}.yml
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user