blob: 476af2228e49bb236224333ddffe461eddd545c1 [file] [log] [blame]
---
# docker tasks/main.yml
#
# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
- name: include OS-specific vars
include_vars: "{{ ansible_os_family }}.yml"
- name: include OS-specific package repo updates
include_tasks: "{{ ansible_os_family }}-repo.yml"
when: docker_add_package_repo | bool
- name: include OS-specific tasks
include_tasks: "{{ ansible_os_family }}.yml"
- name: ensure /etc/docker/ directory exists
file:
path: /etc/docker
state: directory
mode: 0755
when: docker_daemon_options.keys() | length > 0
- name: configure Docker daemon options
copy:
content: "{{ docker_daemon_options | to_nice_json }}"
dest: /etc/docker/daemon.json
mode: 0644
when: docker_daemon_options.keys() | length > 0
notify: restart docker
- name: install docker compose (if configured).
get_url:
url: "{{ docker_compose_url }}"
checksum: "{{ docker_compose_checksum }}"
dest: "{{ docker_compose_path }}"
mode: 0755
when: docker_install_compose | bool