diff options
author | Scott Dodson <sdodson@redhat.com> | 2016-08-11 17:39:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-11 17:39:16 -0400 |
commit | ae26dfd755cc079ff90954107c9a51c51c633565 (patch) | |
tree | e5f8a71df22a0cdaf2273b3046650c8bb9d186e5 /playbooks/common/openshift-cluster/upgrades/docker | |
parent | add6fd9fac9ea32dd87a97173abf3576e8d49a3b (diff) | |
parent | b89c835e3235f2628b37de15713c311d1b5a4bad (diff) | |
download | openshift-ae26dfd755cc079ff90954107c9a51c51c633565.tar.gz openshift-ae26dfd755cc079ff90954107c9a51c51c633565.tar.bz2 openshift-ae26dfd755cc079ff90954107c9a51c51c633565.tar.xz openshift-ae26dfd755cc079ff90954107c9a51c51c633565.zip |
Merge pull request #2285 from dgoodwin/nuke-images-2
Improvements for Docker 1.10+ Upgrade Image Nuking
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades/docker')
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml index 20d66522f..03e7b844c 100644 --- a/playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml +++ b/playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml @@ -13,14 +13,32 @@ failed_when: false when: openshift.common.is_containerized | bool +- name: Check Docker image count + shell: "docker images -aq | wc -l" + register: docker_image_count + +- debug: var=docker_image_count.stdout + - name: Remove all containers and images script: nuke_images.sh docker register: nuke_images_result when: docker_upgrade_nuke_images is defined and docker_upgrade_nuke_images | bool +- name: Check Docker image count + shell: "docker images -aq | wc -l" + register: docker_image_count + when: docker_upgrade_nuke_images is defined and docker_upgrade_nuke_images | bool + +- debug: var=docker_image_count.stdout + when: docker_upgrade_nuke_images is defined and docker_upgrade_nuke_images | bool + +- service: name=docker state=stopped + - name: Upgrade Docker action: "{{ ansible_pkg_mgr }} name=docker{{ '-' + docker_version }} state=present" +- service: name=docker state=started + - name: Restart containerized services service: name={{ item }} state=started with_items: |