ansible-role-openstack-oper.../tasks/cleanup_docker.yml
2018-04-27 17:11:10 -04:00

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 }}"