From df74a04e92b267a711e69b26dd0c7cd5375797c9 Mon Sep 17 00:00:00 2001 From: Brenton Leanhardt Date: Thu, 19 Nov 2015 08:43:22 -0500 Subject: Making the uninstall playbook more flexible This handles stage environments as well as the eventual change of aep3_beta to aep3 --- playbooks/adhoc/uninstall.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'playbooks/adhoc/uninstall.yml') diff --git a/playbooks/adhoc/uninstall.yml b/playbooks/adhoc/uninstall.yml index 1a55eb053..538414508 100644 --- a/playbooks/adhoc/uninstall.yml +++ b/playbooks/adhoc/uninstall.yml @@ -111,12 +111,12 @@ - atomic-enterprise - origin - - shell: docker ps -a | grep Exited | grep "{{ item }}" | awk '{print $1}' + - shell: docker ps -a | grep Exited | egrep "{{ item }}" | awk '{print $1}' changed_when: False failed_when: False register: exited_containers_to_delete with_items: - - aep3/aep + - aep3.*/aep - openshift3/ose - openshift/origin @@ -125,13 +125,13 @@ failed_when: False with_items: "{{ exited_containers_to_delete.results }}" - - shell: docker images | grep {{ item }} | awk '{ print $3 }' + - shell: docker images | egrep {{ item }} | awk '{ print $3 }' changed_when: False failed_when: False register: images_to_delete with_items: - - registry.access.redhat.com/openshift3 - - registry.access.redhat.com/aep3 + - registry\.access\..*redhat\.com/openshift3 + - registry\.access\..*redhat\.com/aep3 - docker.io/openshift - shell: "docker rmi -f {{ item.stdout_lines | join(' ') }}" -- cgit v1.2.3