Explorar o código

Add step to remove all k8s_ containers

In case of uninstalling partially operational
cluster, we want to cleanup any running pods
created by kubernetes.
Michael Gugino %!s(int64=6) %!d(string=hai) anos
pai
achega
a6e88c08b6
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      playbooks/adhoc/uninstall_openshift.yml

+ 4 - 0
playbooks/adhoc/uninstall_openshift.yml

@@ -239,6 +239,10 @@
     failed_when: False
     with_items: "{{ exited_containers_to_delete.results }}"
 
+  - name: Remove k8s_ containters
+    shell: docker ps -a -q -f name=k8s_ | xargs docker rm -f
+    failed_when: False
+
   - block:
     - block:
       - shell: docker images | egrep {{ item }} | awk '{ print $3 }'