1
0
IaC/ansible/roles/k8s_storage_rook_destroy/tasks/main.yaml

21 lines
486 B
YAML
Raw Normal View History

2022-11-02 05:18:55 -04:00
---
- name: destroy the rook cluster
become: false
run_once: true
local_action:
module: kubernetes.core.k8s
src: "{{ ansible_search_path[0] }}/../k8s_storage_deploy/files/rook/rook_cluster_modified.yaml"
state: absent
- name: delete the rook host storage
ansible.builtin.file:
path: /var/lib/rook
state: absent
- name: wipe parititons on storage disks
ansible.builtin.shell:
cmd: |
wipefs -a -f /dev/{{ item }}
with_items:
- sda
- sdb