--- - name: Prune unused Docker images hosts: all become: yes tasks: - name: Prune all unused Docker images ansible.builtin.shell: docker image prune -a -f args: warn: false