blob: 09e790a43cc222cf400ec7e6d557c7cd305b88c0 [file] [log] [blame]
---
- name: Install docker
package:
name: 'docker-ce'
state: present
notify:
- Restart Docker
- name: Install docker python module
package:
name: 'python2-docker'
state: present
- name: Ensure /etc/docker exists
file:
path: /etc/docker
state: directory
- name: Setup docker dns settings
json_add:
path: /etc/docker/daemon.json
key: dns
value: "{{ hostvars[groups.infrastructure[0]].cluster_ip }}"
notify:
- Restart Docker
- name: Force notified handlers to run at this point
meta: flush_handlers
- name: Ensure docker is started
systemd:
name: docker
state: started
enabled: yes