Allow to pass BOOTSTRAP_EXTRA_PARAMS to bootstrap-aio.yml

This patch allows to pass custom parameters to the bootstrap-aio.yml
playbook by the `BOOTSTRAP_EXTRA_PARAMS` variable.
With `BOOTSTRAP_OPTS` it was only possible to set extra variables.
As an exmaple, `BOOTSTRAP_EXTRA_PARAMS` can be used to define custom
set of tags that should be executed.

Change-Id: Ie53b51f4e4d5ccbd0e7ff638a9d5bce236a561bd
This commit is contained in:
Damian Dabrowski
2023-06-04 16:43:32 +02:00
parent 555ec6abb7
commit 0eb9ccab3a

View File

@@ -46,16 +46,13 @@ export GROUP_VARS_PATH="/dev/null"
# Run AIO bootstrap playbook # Run AIO bootstrap playbook
pushd tests pushd tests
if [ -z "${BOOTSTRAP_OPTS}" ]; then export BOOTSTRAP_OPTS_ITEMS=''
/usr/local/bin/ansible-playbook bootstrap-aio.yml for BOOTSTRAP_OPT in ${BOOTSTRAP_OPTS}; do
else BOOTSTRAP_OPTS_ITEMS=${BOOTSTRAP_OPTS_ITEMS}"-e "${BOOTSTRAP_OPT}" "
export BOOTSTRAP_OPTS_ITEMS='' done
for BOOTSTRAP_OPT in ${BOOTSTRAP_OPTS}; do /usr/local/bin/ansible-playbook bootstrap-aio.yml \
BOOTSTRAP_OPTS_ITEMS=${BOOTSTRAP_OPTS_ITEMS}"-e "${BOOTSTRAP_OPT}" " ${BOOTSTRAP_OPTS_ITEMS} \
done ${BOOTSTRAP_EXTRA_PARAMS:-}
/usr/local/bin/ansible-playbook bootstrap-aio.yml \
${BOOTSTRAP_OPTS_ITEMS}
fi
popd popd
# Now unset the env var overrides so that the defaults work again # Now unset the env var overrides so that the defaults work again