From: Dimitri Savineau Date: Tue, 7 Jan 2020 20:30:16 +0000 (-0500) Subject: purge-container-cluster: prune exited containers X-Git-Tag: v6.0.0alpha1~148 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=42366f0a6c6ef3552691172ce579dcc4fbd08c3d;p=ceph-ansible.git purge-container-cluster: prune exited containers Remove all stopped/exited containers. Signed-off-by: Dimitri Savineau --- diff --git a/infrastructure-playbooks/purge-container-cluster.yml b/infrastructure-playbooks/purge-container-cluster.yml index efdd22e80..e76eb43cf 100644 --- a/infrastructure-playbooks/purge-container-cluster.yml +++ b/infrastructure-playbooks/purge-container-cluster.yml @@ -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: >