summaryrefslogtreecommitdiffstats
path: root/bifrost
diff options
context:
space:
mode:
Diffstat (limited to 'bifrost')
-rwxr-xr-xbifrost/scripts/bifrost-provision.sh6
-rwxr-xr-xbifrost/scripts/destroy-env.sh19
2 files changed, 13 insertions, 12 deletions
diff --git a/bifrost/scripts/bifrost-provision.sh b/bifrost/scripts/bifrost-provision.sh
index 726a4da4..67d5e2d8 100755
--- a/bifrost/scripts/bifrost-provision.sh
+++ b/bifrost/scripts/bifrost-provision.sh
@@ -21,7 +21,7 @@ BUILD_IMAGE=true
PROVISION_WAIT_TIMEOUT=${PROVISION_WAIT_TIMEOUT:-3600}
# This is normally exported by XCI env but we should initialize it here
# in case we run this script on its own for debug purposes
-XCI_ANSIBLE_VERBOSITY=${XCI_ANSIBLE_VERBOSITY:-}
+XCI_ANSIBLE_PARAMS=${XCI_ANSIBLE_PARAMS:-}
# Ironic SHAs
BIFROST_IRONIC_INSPECTOR_VERSION=${BIFROST_IRONIC_INSPECTOR_VERSION:-master}
BIFROST_IRONIC_INSPECTOR_CLIENT_VERSION=${BIFROST_IRONIC_INSPECTOR_CLIENT_VERSION:-master}
@@ -132,7 +132,7 @@ if [[ -e /etc/centos-release ]]; then
fi
# Create the VMS
-${ANSIBLE} ${XCI_ANSIBLE_VERBOSITY} \
+${ANSIBLE} ${XCI_ANSIBLE_PARAMS} \
-i inventory/localhost \
test-bifrost-create-vm.yaml \
-e test_vm_num_nodes=${TEST_VM_NUM_NODES} \
@@ -143,7 +143,7 @@ ${ANSIBLE} ${XCI_ANSIBLE_VERBOSITY} \
-e ${INVENTORY_FILE_FORMAT}=${BAREMETAL_DATA_FILE}
# Execute the installation and VM startup test
-${ANSIBLE} ${XCI_ANSIBLE_VERBOSITY} \
+${ANSIBLE} ${XCI_ANSIBLE_PARAMS} \
-i inventory/bifrost_inventory.py \
${TEST_PLAYBOOK} \
-e use_cirros=${USE_CIRROS} \
diff --git a/bifrost/scripts/destroy-env.sh b/bifrost/scripts/destroy-env.sh
index 97638303..73c0222b 100755
--- a/bifrost/scripts/destroy-env.sh
+++ b/bifrost/scripts/destroy-env.sh
@@ -18,18 +18,19 @@ fi
rm -rf /opt/stack
# HOME is normally set by sudo -H
rm -rf ${HOME}/.config/openstack
+rm -rf ${HOME}/.ansible
# bifrost installs everything on venv so we need to look there if virtualbmc is not installed on the host.
if which vbmc &>/dev/null || { [[ -e /opt/stack/bifrost/bin/activate ]] && source /opt/stack/bifrost/bin/activate; }; then
- # Delete all libvirt VMs and hosts from vbmc (look for a port number)
- for vm in $(vbmc list | awk '/[0-9]/{{ print $2 }}'); do
- if which virsh &>/dev/null; then
- virsh destroy $vm || true
- virsh undefine $vm || true
- fi
- vbmc delete $vm
- done
- which vbmc &>/dev/null || { [[ -e /opt/stack/bifrost/bin/activate ]] && deactivate; }
+ # Delete all libvirt VMs and hosts from vbmc (look for a port number)
+ for vm in $(vbmc list | awk '/[0-9]/{{ print $2 }}'); do
+ if which virsh &>/dev/null; then
+ virsh destroy $vm || true
+ virsh undefine $vm || true
+ fi
+ vbmc delete $vm
+ done
+ which vbmc &>/dev/null || { [[ -e /opt/stack/bifrost/bin/activate ]] && deactivate; }
fi
# Destroy all XCI VMs if the previous operation failed