Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
tripleo_podman_purge: try to use -f when pruning images
Browse files Browse the repository at this point in the history
Recent version of podman requires yes/no when pruning images, except if
-f is given as an argument.

Let's first try the new way, and fallback on the old method.

Change-Id: Ie2a70d4ec40c2a2142b0857822edd5122b63c941
Closes-Bug: #1889418
  • Loading branch information
EmilienM committed Jul 29, 2020
1 parent cf36c38 commit f9b8917
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@
# under the License.


- name: Podman prune
- name: Podman image prune
become: true
block:
- name: Clean podman images
command: podman image prune -a -f
rescue:
# In case -f isn't available yet, we fallback to old way.
# https://bugs.launchpad.net/tripleo/+bug/1889418
- name: Clean podman images
command: podman image prune -a

- name: Clean podman volumes
command: podman volume prune -f
- name: Clean podman volumes
become: true
command: podman volume prune -f

0 comments on commit f9b8917

Please sign in to comment.