Преглед изворни кода

remove operator namespace if so requested

Grega Bremec пре 3 дана
родитељ
комит
bbf2ca97f0
1 измењених фајлова са 11 додато и 0 уклоњено
  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
 ...