diff --git a/dockerprune.yml b/dockerprune.yml new file mode 100644 index 0000000..2e99a8e --- /dev/null +++ b/dockerprune.yml @@ -0,0 +1,14 @@ +--- +- name: Prune unused Docker images + hosts: all + become: yes + tasks: + - name: Prune dangling images + docker_image: + prune: yes + dangling: yes + + - name: Prune all unused images + command: docker image prune -a -f + args: + warn: false \ No newline at end of file