Force removal of stopped or running containers
Use --force to remove containers, no matter what is its current state. Closes-Bug: #1836145 Change-Id: I20bdb523d918adb33c5f72512d960d3709bd4895 Signed-off-by: Kevin Carter <kecarter@redhat.com>
This commit is contained in:
parent
add4969e6b
commit
78951712ad
@ -73,11 +73,7 @@
|
||||
register: stat_container
|
||||
|
||||
- name: Stop and remove container
|
||||
command: "podman container rm --force {{ container }}"
|
||||
changed_when: true
|
||||
when:
|
||||
- stat_container.rc == 0
|
||||
block:
|
||||
- name: Stop container
|
||||
command: podman container kill "{{ container }}"
|
||||
|
||||
- name: "remove {{ container }} container"
|
||||
command: "podman container rm {{ container }}"
|
||||
|
Loading…
Reference in New Issue
Block a user