summaryrefslogtreecommitdiffstats
path: root/ci/cleanmaas.sh
diff options
context:
space:
mode:
authorRyota MIBU <r-mibu@cq.jp.nec.com>2017-01-27 04:44:48 +0000
committerRyota MIBU <r-mibu@cq.jp.nec.com>2017-01-27 04:48:17 +0000
commit50e1c44f64585abe63bd40982cb379412045fa33 (patch)
tree885484b9ccf27f0e0a18fc208e1d769c989df7e2 /ci/cleanmaas.sh
parent59f0f3aa4b49425e19369b2d5fe7b55688b23f7f (diff)
improvements for default virtual pod creation
This patch includes the following improvements: - deprecate ci/00-maasdeploy.sh - refactor cleaner sctipts - fix MAAS_IP in default configs Change-Id: I60f77e18ce41573a744d79b8cf468c23a7dd3385 Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
Diffstat (limited to 'ci/cleanmaas.sh')
-rwxr-xr-xci/cleanmaas.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/ci/cleanmaas.sh b/ci/cleanmaas.sh
new file mode 100755
index 00000000..40961359
--- /dev/null
+++ b/ci/cleanmaas.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -ex
+
+maasver=$(apt-cache policy maas | grep Installed | cut -d ':' -f 2 | sed -e 's/^.*: //')
+
+if [[ "$maasver" > "2" ]]; then
+ echo "removing existing maas ..."
+ sudo apt-get purge maas maas-cli maas-common maas-dhcp maas-dns maas-proxy maas-rack-controller maas-region-api maas-region-controller -y
+ sudo rm -rf /var/lib/maas
+fi