Skip to content

Commit

Permalink
Rename rook-cleanup -> rook-purge (#496)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt authored Sep 24, 2024
1 parent 875d7c9 commit c1b2ad9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
12 changes: 0 additions & 12 deletions playbooks/rook/rook-cleanup.yml

This file was deleted.

32 changes: 32 additions & 0 deletions playbooks/rook/rook-purge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
- name: Confirm whether user really meant to purge the cluster
hosts: localhost
gather_facts: false

vars_prompt:
- name: ireallymeanit
prompt: Are you sure you want to purge the cluster?
default: 'no'
private: no

tasks:
- name: Exit playbook, if user did not mean to purge cluster
ansible.builtin.fail:
msg: >
"Exiting rook-purge playbook, cluster was NOT purged.
To purge the cluster, either say 'yes' on the prompt or
or use `-e ireallymeanit=yes` on the command line when
invoking the playbook"
when: ireallymeanit != 'yes'

- name: Purge Ceph cluster managed with Rook
hosts:
- "{{ hosts_manager|default(groups['manager'][0])|default('localhost') }}"
connection: local
gather_facts: false

tasks:
- name: Include cleanup.yml from osism.services.rook role
ansible.builtin.include_role:
name: osism.services.rook
tasks_from: cleanup.yml

0 comments on commit c1b2ad9

Please sign in to comment.