aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/ceph-deploy/templates/clean_ceph.j2
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/ceph-deploy/templates/clean_ceph.j2')
-rw-r--r--deploy/adapters/ansible/roles/ceph-deploy/templates/clean_ceph.j28
1 files changed, 8 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/ceph-deploy/templates/clean_ceph.j2 b/deploy/adapters/ansible/roles/ceph-deploy/templates/clean_ceph.j2
new file mode 100644
index 00000000..a089167d
--- /dev/null
+++ b/deploy/adapters/ansible/roles/ceph-deploy/templates/clean_ceph.j2
@@ -0,0 +1,8 @@
+if [ -d "{{ ceph_cluster_dir[0] }}" ]; then
+cd {{ ceph_cluster_dir[0] }}
+ceph-deploy purge {{ ceph_cluster_hosts.stdout_lines[0] }}
+ceph-deploy purgedata {{ ceph_cluster_hosts.stdout_lines[0] }}
+ceph-deploy forgetkeys
+cd ..
+rm -r {{ ceph_cluster_dir[0] }}
+fi