I know how remove all images using shell:
- shell: |
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
exit 0
Also I can remove image with docker_image by name:
- name: Remove image
docker_image:
state: absent
name: {{image_name}}
But, is there a way to remove all images using docker_image module or any other Ansible module for working with docker?