blob: 476af2228e49bb236224333ddffe461eddd545c1 [file] [log] [blame]
Zack Williamse0d9eb92020-11-29 22:39:20 -07001---
2# docker tasks/main.yml
3#
4# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
5# SPDX-License-Identifier: Apache-2.0
6
7- name: include OS-specific vars
8 include_vars: "{{ ansible_os_family }}.yml"
9
Hyunsun Moonc272be62021-12-02 13:54:40 -080010- name: include OS-specific package repo updates
11 include_tasks: "{{ ansible_os_family }}-repo.yml"
12 when: docker_add_package_repo | bool
13
Zack Williamse0d9eb92020-11-29 22:39:20 -070014- name: include OS-specific tasks
15 include_tasks: "{{ ansible_os_family }}.yml"
Hyunsun Moonc272be62021-12-02 13:54:40 -080016
17- name: ensure /etc/docker/ directory exists
18 file:
19 path: /etc/docker
20 state: directory
21 mode: 0755
22 when: docker_daemon_options.keys() | length > 0
23
24- name: configure Docker daemon options
25 copy:
26 content: "{{ docker_daemon_options | to_nice_json }}"
27 dest: /etc/docker/daemon.json
28 mode: 0644
29 when: docker_daemon_options.keys() | length > 0
30 notify: restart docker
31
32- name: install docker compose (if configured).
33 get_url:
34 url: "{{ docker_compose_url }}"
35 checksum: "{{ docker_compose_checksum }}"
36 dest: "{{ docker_compose_path }}"
37 mode: 0755
38 when: docker_install_compose | bool