summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2015-10-21 15:56:24 -0400
committerBrenton Leanhardt <bleanhar@redhat.com>2015-10-22 08:41:36 -0400
commit6ada8b8eb4ebe60ba18226caa5b4812b26161379 (patch)
treee78341e7836effcf8e0b7a0c17b25036813c2b2f
parent1b0c615d3c1c7dfd6484ba399763282586475599 (diff)
downloadopenshift-6ada8b8eb4ebe60ba18226caa5b4812b26161379.tar.gz
openshift-6ada8b8eb4ebe60ba18226caa5b4812b26161379.tar.bz2
openshift-6ada8b8eb4ebe60ba18226caa5b4812b26161379.tar.xz
openshift-6ada8b8eb4ebe60ba18226caa5b4812b26161379.zip
Deleting exited openshift containers and some other minor touch ups
-rw-r--r--playbooks/adhoc/uninstall.yml18
1 files changed, 17 insertions, 1 deletions
diff --git a/playbooks/adhoc/uninstall.yml b/playbooks/adhoc/uninstall.yml
index 3e865706d..40db668da 100644
--- a/playbooks/adhoc/uninstall.yml
+++ b/playbooks/adhoc/uninstall.yml
@@ -39,6 +39,7 @@
- atomic-enterprise-node
- atomic-enterprise-sdn-ovs
- atomic-openshift
+ - atomic-openshift-clients
- atomic-openshift-master
- atomic-openshift-node
- atomic-openshift-sdn-ovs
@@ -46,6 +47,7 @@
- openshift
- openshift-master
- openshift-node
+ - openshift-sdn
- openshift-sdn-ovs
- openvswitch
- origin
@@ -80,6 +82,20 @@
- atomic-enterprise
- origin
+ - shell: docker ps -a | grep Exited | grep "{{ item }}" | awk '{print $1}'
+ changed_when: False
+ failed_when: False
+ register: exited_containers_to_delete
+ with_items:
+ - aep3/aep
+ - openshift3/ose
+ - openshift/origin
+
+ - shell: "docker rm {{ item.stdout_lines | join(' ') }}"
+ changed_when: False
+ failed_when: False
+ with_items: "{{ exited_containers_to_delete.results }}"
+
- shell: docker images | grep {{ item }} | awk '{ print $3 }'
changed_when: False
failed_when: False
@@ -89,7 +105,7 @@
- registry.access.redhat.com/aep3
- docker.io/openshift
- - shell: "docker rmi {{ item.stdout_lines | join(' ') }}"
+ - shell: "docker rmi -f {{ item.stdout_lines | join(' ') }}"
changed_when: False
failed_when: False
with_items: "{{ images_to_delete.results }}"