2019-04-24 04:36:03 +08:00
|
|
|
#!/bin/bash
|
|
|
|
set -euxo pipefail
|
|
|
|
|
2022-05-03 02:34:31 +08:00
|
|
|
: ${ANSIBLE_MAJOR_VERSION:=2.12}
|
2021-11-11 08:11:50 +08:00
|
|
|
|
|
|
|
/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-24 04:36:03 +08:00
|
|
|
mkdir -p /.ssh
|
2020-04-01 22:23:29 +08:00
|
|
|
mkdir -p cluster-dump
|
2019-04-24 04:36:03 +08:00
|
|
|
mkdir -p $HOME/.ssh
|
|
|
|
ansible-playbook --version
|
2021-11-11 08:11:50 +08: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
|