summaryrefslogtreecommitdiffstats
path: root/bifrost/scripts
diff options
context:
space:
mode:
authorPeriyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>2018-03-12 16:16:13 +0100
committerPeriyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>2018-03-12 16:32:03 +0100
commitafc51e7945b2e1359653b48db4e5c26500ec582c (patch)
tree70668c29ef1fa81ef288b39ab48ca4c51cfa75b0 /bifrost/scripts
parent6a86fba9dac4c1f37d854335afb936d36967f084 (diff)
remove .ansible directory
It's needed to remove .ansible directory which could be a leftovers by some other ansible execution enviroment which would affect XCI deployment. Change-Id: Ic334ef1ca53878721762b23b238fe9a8aeefa0e0 Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
Diffstat (limited to 'bifrost/scripts')
-rwxr-xr-xbifrost/scripts/destroy-env.sh19
1 files changed, 10 insertions, 9 deletions
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