remove salt-master from mirror image
Change-Id: I182f0f79808bc53666f90a39a9d1a479e387655a
diff --git a/common/ubuntu_cleanup_salt.sh b/common/ubuntu_cleanup_salt.sh
index 13420da..db140a5 100644
--- a/common/ubuntu_cleanup_salt.sh
+++ b/common/ubuntu_cleanup_salt.sh
@@ -1,6 +1,6 @@
#!/bin/bash -xe
-apt-get purge salt-formula-* -y
+apt-get purge -y salt-formula-*
salt-call saltutil.clear_cache || true
@@ -28,6 +28,12 @@
# remove all keys at all
rm -rf /etc/salt/pki/* || true
+# Remove salt-master from apt01
+if [[ "$(hostname)" == *"apt01"* ]] ; then
+ apt-get purge -y salt-master
+ rm -rfv /etc/salt/master.d || true
+fi
+
# Clear\drop cache's
sync
echo 3 > /proc/sys/vm/drop_caches