--- - name: Prune unused Docker images hosts: all become: true tasks: - name: Prune unused Docker images using shell shell: docker image prune -f args: warn: false