Merge "Allow overrides of bootstrap ansible script"
This commit is contained in:
commit
f6aee32287
leap-upgrades
@ -97,7 +97,15 @@ function run_lock {
|
|||||||
set -e
|
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
|
if [[ -d "/opt/ansible-runtime" ]]; then
|
||||||
rm -rf "/opt/ansible-runtime"
|
rm -rf "/opt/ansible-runtime"
|
||||||
else
|
else
|
||||||
@ -117,7 +125,7 @@ function system_bootstrap {
|
|||||||
notice "Removed System installed Ansible"
|
notice "Removed System installed Ansible"
|
||||||
done
|
done
|
||||||
|
|
||||||
pushd "$1"
|
pushd "${BOOTSTRAP_ANSIBLE_FOLDER}"
|
||||||
# Install ansible for system migrations
|
# Install ansible for system migrations
|
||||||
scripts/bootstrap-ansible.sh
|
scripts/bootstrap-ansible.sh
|
||||||
popd
|
popd
|
||||||
|
@ -40,6 +40,9 @@ export VALIDATE_UPGRADE_INPUT="${VALIDATE_UPGRADE_INPUT:-TRUE}"
|
|||||||
export UPGRADES_TO_TODOLIST="${UPGRADES_TO_TODOLIST:-''}"
|
export UPGRADES_TO_TODOLIST="${UPGRADES_TO_TODOLIST:-''}"
|
||||||
export CODE_UPGRADE_FROM=""
|
export CODE_UPGRADE_FROM=""
|
||||||
|
|
||||||
|
# Bootstrap ansible tool, see also bootstrap_recent_ansible
|
||||||
|
export BOOTSTRAP_ANSIBLE_FOLDER=${BOOTSTRAP_ANSIBLE_FOLDER:-/opt/openstack-ansible/}
|
||||||
|
|
||||||
## Ansible debugging
|
## Ansible debugging
|
||||||
export LEAP_TIMESTAMP=$(date +%s)
|
export LEAP_TIMESTAMP=$(date +%s)
|
||||||
export ANSIBLE_LOG_PATH="/opt/leap42/ansible-${LEAP_TIMESTAMP}.log"
|
export ANSIBLE_LOG_PATH="/opt/leap42/ansible-${LEAP_TIMESTAMP}.log"
|
||||||
|
@ -73,6 +73,6 @@ if [[ ! -f "/opt/leap42/openstack-ansible-prep-finalsteps.leap" ]]; then
|
|||||||
unset ANSIBLE_INVENTORY
|
unset ANSIBLE_INVENTORY
|
||||||
|
|
||||||
link_release "/opt/leap42/openstack-ansible-${NEWTON_RELEASE}"
|
link_release "/opt/leap42/openstack-ansible-${NEWTON_RELEASE}"
|
||||||
system_bootstrap "/opt/openstack-ansible"
|
bootstrap_recent_ansible
|
||||||
touch "/opt/leap42/openstack-ansible-prep-finalsteps.leap"
|
touch "/opt/leap42/openstack-ansible-prep-finalsteps.leap"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user