I would like to remove all docker images, which are not labeled with 2 or more labels. Since Ansible 2.8 there is a docker_prune command, which I would like to use in combination with the images_filter options like this:
docker_prune:
debug: yes
containers: no
images: yes
images_filters:
label: not label1 label2
dangling: false
In the docker prune documentation there is an easy way to to that:
docker image prune --filter="label!=label1!=label2"
Is there any way to negate the label option in the command or is the only way to loop over the docker_prune with the help of a label list?