24 lines
585 B
YAML
24 lines
585 B
YAML
- name: Gather Docker facts
|
|
docker_facts:
|
|
image_filter: "{{ operations_image_filter }}"
|
|
volume_filter: "{{ operations_volume_filter }}"
|
|
container_filter: "{{ operations_container_filter }}"
|
|
|
|
- name: Remove images
|
|
docker_image:
|
|
name: "{{ item }}"
|
|
state: absent
|
|
loop: "{{ docker.images_filtered }}"
|
|
|
|
- name: Remove containers
|
|
docker_container:
|
|
name: "{{ item }}"
|
|
state: absent
|
|
loop: "{{ docker.containers_filtered }}"
|
|
|
|
- name: Remove dangling volumes
|
|
docker_volume:
|
|
name: "{{ item }}"
|
|
state: absent
|
|
loop: "{{ docker.volumes_filtered }}"
|