Skip to content

Commit

Permalink
purge-container-cluster: prune exited containers
Browse files Browse the repository at this point in the history
Remove all stopped/exited containers.

Signed-off-by: Dimitri Savineau <[email protected]>
  • Loading branch information
dsavineau authored and guits committed Jan 8, 2020
1 parent 254ab54 commit 42366f0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions infrastructure-playbooks/purge-container-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,12 @@

- import_role:
name: ceph-facts
tasks_from: container_binary

- name: remove stopped/exited containers
command: >
{{ container_binary }} container prune{% if container_binary == 'docker' %} -f{% endif %}
changed_when: false

- name: show container list on all the nodes (should be empty)
command: >
Expand Down

0 comments on commit 42366f0

Please sign in to comment.