22 lines
478 B
YAML
22 lines
478 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) 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
|