From f801e5c6d026944cd295cde9f41d9ae8bf7eec38 Mon Sep 17 00:00:00 2001 From: Matt Young Date: Mon, 4 Jun 2018 17:18:45 -0400 Subject: [PATCH] promoter: Use force parameter when removing images http://docs.ansible.com/ansible/latest/modules/docker_image_module.html The current promoter does not actually untag and delete the images from the promoter's local disk, yielding eventual out of space issues for /var/lib/docker. This adds the force option, which when used together with state: absent should actually remove the bits. (from doc: state) "When absent an image will be removed. Use the force option to un-tag and remove all images matching the provided name." (from doc: force) "Use with state absent to un-tag and remove all images matching the specified name. Use with state present to build, load or pull an image when the image already exists." Change-Id: Ie0d801d167986696f72207d4ece571529c50daa2 --- ci-scripts/container-push/container-push.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci-scripts/container-push/container-push.yml b/ci-scripts/container-push/container-push.yml index 7b5f78746..a2d060619 100644 --- a/ci-scripts/container-push/container-push.yml +++ b/ci-scripts/container-push/container-push.yml @@ -159,6 +159,7 @@ name: "trunk.registry.rdoproject.org/{{ rdoproject_namespace }}/centos-binary-{{ item[0] }}" tag: "{{ item[1] }}" state: absent + force: yes with_nested: - "{{ built_images.stdout_lines }}" - ["{{ full_hash }}", "{{ named_label }}"] @@ -172,6 +173,7 @@ name: "docker.io/{{ dockerhub_namespace }}/centos-binary-{{ item[0] }}" tag: "{{ item[1] }}" state: absent + force: yes with_nested: - "{{ built_images.stdout_lines }}" - ["{{ full_hash }}", "{{ named_label }}"]