2019-04-23 20:36:03 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -euxo pipefail
|
|
|
|
|
2021-11-11 00:11:50 +00:00
|
|
|
: ${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
|
2019-04-23 20:36:03 +00:00
|
|
|
mkdir -p /.ssh
|
2020-04-01 14:23:29 +00:00
|
|
|
mkdir -p cluster-dump
|
2019-04-23 20:36:03 +00:00
|
|
|
mkdir -p $HOME/.ssh
|
|
|
|
ansible-playbook --version
|
2021-11-11 00:11:50 +00:00
|
|
|
|
|
|
|
# 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
|