blob: 9851d4dc555f428d0b2633d64a884f446181db95 [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 Zegan55dd7f52019-01-04 14:20:03 +010023 value: "{{ hostvars[groups.infrastructure[0]].ansible_default_ipv4.address }}"
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