aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/docker/tasks/main.yml
blob: 2b0d508489b617795936dd3ebdc9f22b02ad85d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
- name: Check if Docker is installed
  command: docker --version
  register: docker_version
  changed_when: no
  ignore_errors: yes
      
- name: Clean up Docker data
  become: yes
  community.docker.docker_prune:
    containers: yes
    images: yes
    images_filters:
      dangling: false
    networks: yes
    volumes: yes
    builder_cache: yes
  when: docker_version.rc == 0