blob: 13420da2ea0835b32d9803f401d45a1ac2ae8c11 [file] [log] [blame]
azvyagintsev29410ee2018-07-12 20:02:30 +03001#!/bin/bash -xe
2
3apt-get purge salt-formula-* -y
4
azvyagintsev73fff7f2018-07-19 23:11:36 +03005salt-call saltutil.clear_cache || true
6
azvyagintsev29410ee2018-07-12 20:02:30 +03007echo "removing all previously accepted salt keys"
8salt-key -D -y || true
9
10echo "cleaning up reclass"
11rm -rf /srv/salt/reclass || true
12rm -rf /srv/salt/scripts || true
13rm -rf /usr/share/salt-formulas/env || true
14#
15mkdir -p /srv/salt/reclass/
16mkdir -p /usr/share/salt-formulas/reclass/service/
17mkdir -p /usr/share/salt-formulas/env/
18
19# stop and disable services, for healthy zerodisk
20# They should be enabled after VCP init
azvyagintsev73fff7f2018-07-19 23:11:36 +030021stop_services="salt-minion salt-master salt-api"
azvyagintsev29410ee2018-07-12 20:02:30 +030022for s in ${stop_services} ; do
23 systemctl stop ${s} || true
24# Enable this, after refactoring salt:control:virtng
25# systemctl disable ${s} || true
26done
27
azvyagintsev73fff7f2018-07-19 23:11:36 +030028# remove all keys at all
29rm -rf /etc/salt/pki/* || true
30
azvyagintsev29410ee2018-07-12 20:02:30 +030031# Clear\drop cache's
32sync
33echo 3 > /proc/sys/vm/drop_caches