From afc51e7945b2e1359653b48db4e5c26500ec582c Mon Sep 17 00:00:00 2001 From: Periyasamy Palanisamy Date: Mon, 12 Mar 2018 16:16:13 +0100 Subject: 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 --- bifrost/scripts/destroy-env.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'bifrost/scripts') 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 -- cgit 1.2.3-korg