소스 검색

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 }'