From 07b109ff464a1b8b2b8be36418882039bd802da8 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Mon, 6 Apr 2020 13:39:53 -0400 Subject: [PATCH] Add purge script --- purge.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 purge.sh diff --git a/purge.sh b/purge.sh new file mode 100755 index 0000000..3dbb8ce --- /dev/null +++ b/purge.sh @@ -0,0 +1,21 @@ +#!/bin/bash + + +for host in $@; do + ssh deploy@${host} " + sudo systemctl stop ceph-mon@$(hostname -s); + sudo rm -rf /etc/systemd/system/ceph-*.target.wants; + sudo apt purge -y *ceph* *rbd* *rados*; + sudo apt purge -y patroni* postgres* zookeeper* libvirt* + sudo apt purge -y ca-certificates-java fontconfig-config libjemalloc2 libpq5 python-psycopg2 python3-eventlet python3-greenlet python3-jinja2 python3-kazoo python3-markupsafe python3-pkg-resources python3-pygments python3-six uuid-runtime + sudo apt autoremove --purge -y; + sudo apt clean; + sudo rm -rf /etc/pvc-install.* /etc/ceph* /etc/patroni* /etc/postgres* /etc/zookeeper* /etc/libvirt*; + sudo rm -rf /var/lib/postgresql /var/lib/zookeeper /var/lib/libvirt; + sudo rm -rf /run/ceph; + sudo userdel ceph; + sudo umount /var/lib/ceph; + sudo mkfs.ext4 /dev/vgx/ceph; + sudo mount /var/lib/ceph" & +done +wait