blob: 4e777838372a7a2e74973abb4ab33cdbde939e6c [file] [log] [blame]
#!/bin/bash -xe
apt-get purge salt-formula-* -y
echo "removing all previously accepted salt keys"
salt-key -D -y || true
echo "cleaning up reclass"
rm -rf /srv/salt/reclass || true
rm -rf /srv/salt/scripts || true
rm -rf /usr/share/salt-formulas/env || true
#
mkdir -p /srv/salt/reclass/
mkdir -p /usr/share/salt-formulas/reclass/service/
mkdir -p /usr/share/salt-formulas/env/
# stop and disable services, for healthy zerodisk
# They should be enabled after VCP init
stop_services="salt-api salt-master salt-minion"
for s in ${stop_services} ; do
systemctl stop ${s} || true
# Enable this, after refactoring salt:control:virtng
# systemctl disable ${s} || true
done
# Clear\drop cache's
sync
echo 3 > /proc/sys/vm/drop_caches