aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/docker
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-08-14 20:02:59 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-08-14 20:02:59 +0200
commit4db2d0028c293eea44a410bce14590dec8358078 (patch)
tree3a957642882cb2221203b7187a00011cc7147431 /roles/docker
parentletsencrypt: split tasks into different files (diff)
downloadinfra-ansible-4db2d0028c293eea44a410bce14590dec8358078.tar.gz
infra-ansible-4db2d0028c293eea44a410bce14590dec8358078.zip
docker: use community.docker.docker_prune
Diffstat (limited to '')
-rw-r--r--roles/docker/tasks/main.yml10
1 files changed, 8 insertions, 2 deletions
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
index 574a17c..ae8f668 100644
--- a/roles/docker/tasks/main.yml
+++ b/roles/docker/tasks/main.yml
@@ -9,5 +9,11 @@
- name: Clean up Docker data
become: true
- ansible.builtin.command: docker system prune -a -f --volumes
- changed_when: true
+ community.docker.docker_prune:
+ containers: true
+ images: true
+ images_filters:
+ dangling: false
+ networks: true
+ volumes: true
+ builder_cache: true