Browse Source

remove operator namespace if so requested

Grega Bremec 3 days ago
parent
commit
bbf2ca97f0
1 changed files with 11 additions and 0 deletions
  1. 11 0
      playbooks/roles/remove-operators/tasks/main.yml

+ 11 - 0
playbooks/roles/remove-operators/tasks/main.yml

@@ -68,4 +68,15 @@
     state: absent
   ignore_errors: yes
   when: role.csv_kill
+
+- name: Lastly, remove the namespace, if instructed
+  k8s:
+    kubeconfig: tmp/kubeconfig-ocp4
+    validate_certs: no
+    api_version: v1
+    kind: namespace
+    name: "{{ role.sub_nspc }}"
+    state: absent
+  ignore_errors: yes
+  when: role.nsp_kill
 ...