123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- ---
- - name: Remove any of the resources found
- k8s:
- kubeconfig: tmp/kubeconfig-ocp4
- validate_certs: no
- api_version: "{{ item.apiv }}"
- kind: "{{ item.kind }}"
- delete_all: true
- state: absent
- loop: "{{ role.pre_cleanup }}"
- register: removed
- - name: Remove the subscription
- k8s:
- kubeconfig: tmp/kubeconfig-ocp4
- validate_certs: no
- api_version: operators.coreos.com/v1
- kind: subscription
- name: "{{ sub_name }}"
- namespace: "{{ sub_nspc }}"
- state: absent
- - name: Do post-cleanup
- k8s:
- kubeconfig: tmp/kubeconfig-ocp4
- validate_certs: no
- api_version: apiextensions.k8s.io/v1
- kind: customresourcedefinition
- name: "{{ item }}"
- state: absent
- loop: "{{ role.add_cleanup }}"
- ...
|