#!/usr/bin/env bash
-set -x
+set -eux -o pipefail
# shellcheck disable=SC1091
source lib/logging.sh
# shellcheck disable=SC1091
source lib/common.sh
+BMO_RUN_LOCAL="${BMO_RUN_LOCAL:-false}"
+CAPBM_RUN_LOCAL="${CAPBM_RUN_LOCAL:-false}"
+
# Kill and remove the running ironic containers
-for name in ironic ironic-inspector dnsmasq httpd mariadb; do
+for name in ironic ironic-inspector dnsmasq httpd mariadb ipa-downloader; do
sudo "${CONTAINER_RUNTIME}" ps | grep -w "$name$" && sudo "${CONTAINER_RUNTIME}" kill $name
sudo "${CONTAINER_RUNTIME}" ps --all | grep -w "$name$" && sudo "${CONTAINER_RUNTIME}" rm $name -f
done
sudo ifdown baremetal || true
sudo rm -f /etc/sysconfig/network-scripts/ifcfg-baremetal || true
fi
+
+rm -rf $WORKING_DIR
+rm -rf $IRONIC_DATA_DIR