Skip to content

Commit

Permalink
promoter: Use force parameter when removing images
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Matt Young committed Jun 4, 2018
1 parent 4952f33 commit f801e5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ci-scripts/container-push/container-push.yml
Expand Up @@ -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 }}"]
Expand All @@ -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 }}"]
Expand Down

0 comments on commit f801e5c

Please sign in to comment.