---
|
# Implement your Workload removal tasks here
|
|
- name: Remove NFS Storage Project
|
k8s:
|
name: "{{ _nfs_project }}"
|
api_version: v1
|
kind: Namespace
|
state: absent
|
|
- name: Clean up PVs
|
k8s:
|
api_version: v1
|
kind: PersistentVolume
|
name: "{{ item }}"
|
state: absent
|
loop:
|
- "vol0"
|
- "vol1"
|
- "vol2"
|
- "vol3"
|
- "vol4"
|
- "vol5"
|
- "vol6"
|
- "vol7"
|
|
- name: Remove storage class
|
k8s:
|
api_version: storage.k8s.io/v1
|
kind: StorageClass
|
name: "{{ _nfs_provided_storage_class }}"
|
state: absent
|
|
# Leave this as the last task in the playbook.
|
- name: remove_workload tasks complete
|
debug:
|
msg: "Remove Workload tasks completed successfully."
|
when: not silent|bool
|