Merge "Allow overrides of bootstrap ansible script"

This commit is contained in:
Jenkins 2017-08-30 13:40:51 +00:00 committed by Gerrit Code Review
commit f6aee32287
3 changed files with 14 additions and 3 deletions

View File

@ -97,7 +97,15 @@ function run_lock {
set -e
}
function system_bootstrap {
function bootstrap_recent_ansible {
# This ensures that old ansible will be removed
# and that we have a recent enough Ansible version for:
# - the variable upgrades
# - the db migrations
# - the host upgrade
# - the neutron container forget
# - the re deploy, if there was no hook that
# redeployed ansible
if [[ -d "/opt/ansible-runtime" ]]; then
rm -rf "/opt/ansible-runtime"
else
@ -117,7 +125,7 @@ function system_bootstrap {
notice "Removed System installed Ansible"
done
pushd "$1"
pushd "${BOOTSTRAP_ANSIBLE_FOLDER}"
# Install ansible for system migrations
scripts/bootstrap-ansible.sh
popd

View File

@ -40,6 +40,9 @@ export VALIDATE_UPGRADE_INPUT="${VALIDATE_UPGRADE_INPUT:-TRUE}"
export UPGRADES_TO_TODOLIST="${UPGRADES_TO_TODOLIST:-''}"
export CODE_UPGRADE_FROM=""
# Bootstrap ansible tool, see also bootstrap_recent_ansible
export BOOTSTRAP_ANSIBLE_FOLDER=${BOOTSTRAP_ANSIBLE_FOLDER:-/opt/openstack-ansible/}
## Ansible debugging
export LEAP_TIMESTAMP=$(date +%s)
export ANSIBLE_LOG_PATH="/opt/leap42/ansible-${LEAP_TIMESTAMP}.log"

View File

@ -73,6 +73,6 @@ if [[ ! -f "/opt/leap42/openstack-ansible-prep-finalsteps.leap" ]]; then
unset ANSIBLE_INVENTORY
link_release "/opt/leap42/openstack-ansible-${NEWTON_RELEASE}"
system_bootstrap "/opt/openstack-ansible"
bootstrap_recent_ansible
touch "/opt/leap42/openstack-ansible-prep-finalsteps.leap"
fi