Explorar o código

remove operator namespace if so requested

Grega Bremec hai 3 días
pai
achega
bbf2ca97f0
Modificáronse 1 ficheiros con 11 adicións e 0 borrados
  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
 ...