aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/roles/docker/tasks/main.yml
blob: 95f8565f1ab3d678c3c6bd82ca93f6a17097ce86 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11


                                                                  
                      
                          


                      
 




                                     

                            
                                
                       




                     
- name: Configure Docker logging driver
  when: docker_logging_driver is defined and docker_logging_driver
  ansible.builtin.include_tasks: logging.yml

- name: Install Docker
  become: true
  ansible.builtin.package:
    name:
      - docker.io
      - docker-compose
    state: present

- name: Enable & start Docker service
  become: true
  ansible.builtin.systemd_service:
    name: docker
    enabled: true
    state: started

- name: Clean up Docker data
  become: true
  community.docker.docker_prune:
    builder_cache: true
    containers: true
    images: true
    images_filters:
      dangling: false
    networks: true
    volumes: true