blob: 09e790a43cc222cf400ec7e6d557c7cd305b88c0 [file] [log] [blame]
Tomáš Levoraa1d3e822018-12-19 15:39:22 +01001---
2- name: Install docker
3 package:
4 name: 'docker-ce'
5 state: present
6 notify:
7 - Restart Docker
8
9- name: Install docker python module
10 package:
11 name: 'python2-docker'
12 state: present
13
14- name: Ensure /etc/docker exists
15 file:
16 path: /etc/docker
17 state: directory
18
19- name: Setup docker dns settings
20 json_add:
21 path: /etc/docker/daemon.json
22 key: dns
Michal Zeganb5cd82b2019-01-04 14:20:03 +010023 value: "{{ hostvars[groups.infrastructure[0]].cluster_ip }}"
Tomáš Levoraa1d3e822018-12-19 15:39:22 +010024 notify:
25 - Restart Docker
26
27- name: Force notified handlers to run at this point
28 meta: flush_handlers
29
30- name: Ensure docker is started
31 systemd:
32 name: docker
33 state: started
34 enabled: yes