blob: cae64653054c4dfb59bce97fdb7d7a46940f2d0d (
plain) (
tree)
|
|
- name: Check if Docker is installed
command: docker --version
register: docker_version
changed_when: no
failed_when: no
- name: Clean up Docker data
become: yes
command: docker system prune -a -f --volumes
# Broken after a Docker upgrade:
#community.docker.docker_prune:
# containers: yes
# images: yes
# images_filters:
# dangling: false
# networks: yes
# volumes: yes
# builder_cache: yes
when: docker_version.rc == 0
|