浏览代码

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 6 年之前
父节点
当前提交
a6e88c08b6
共有 1 个文件被更改,包括 4 次插入0 次删除
  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 }'