Skip to content

Commit

Permalink
ansible: Clean up old container images in deploy-tasks-container.yml
Browse files Browse the repository at this point in the history
Our machines have piled up a few dozen GB of old tasks containers.
This will keep the current and the new image, and get rid of all older
ones.
  • Loading branch information
martinpitt committed Feb 29, 2024
1 parent fb60d54 commit e930c69
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ansible/maintenance/deploy-tasks-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
gather_facts: false

tasks:
- name: Clean up old container images
# this will fail due to at least one used image, but it's opportunistic anyway
shell: podman rmi --all || true

- name: Pre-pull current container image to avoid long downtime
command: podman pull quay.io/cockpit/tasks

Expand All @@ -22,6 +26,9 @@
gather_facts: false

tasks:
- name: Clean up old container images
shell: podman rmi --all || true

- name: Pre-pull current container image to avoid long downtime
command: podman pull quay.io/cockpit/tasks

Expand Down

0 comments on commit e930c69

Please sign in to comment.