24 lines
503 B
YAML
24 lines
503 B
YAML
# vim: ft=yaml.ansible
|
|
---
|
|
- name: Copy Docker daemon config file
|
|
template:
|
|
src: daemon.json.j2
|
|
dest: /etc/docker/daemon.json
|
|
owner: root
|
|
mode: u=rw,g=r,o=r
|
|
register: daemon_config
|
|
|
|
- name: Disable and (re)start Docker daemon
|
|
service:
|
|
name: "{{ item }}"
|
|
enabled: false
|
|
state: "{{ 'restarted' if daemon_config.changed else 'started' }}"
|
|
loop:
|
|
- docker.socket
|
|
- docker.service
|
|
|
|
- name: Set up Docker services
|
|
import_tasks: services.yml
|
|
tags:
|
|
- services
|