2018-02-13 10:07:24 +01:00
|
|
|
---
|
|
|
|
# Install Docker. Centos needs te be added.
|
|
|
|
|
|
|
|
- apt_key:
|
|
|
|
id: 58118E89F3A912897C070ADBF76221572C52609D
|
|
|
|
keyserver: hkp://p80.pool.sks-keyservers.net:80
|
|
|
|
state: present
|
|
|
|
when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'xenial'
|
|
|
|
|
|
|
|
- apt_repository:
|
|
|
|
repo: deb https://apt.dockerproject.org/repo ubuntu-xenial main
|
|
|
|
update_cache: yes
|
|
|
|
when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'xenial'
|
|
|
|
|
|
|
|
- name: install docker
|
|
|
|
apt: pkg={{ item }} state=latest
|
|
|
|
with_items:
|
2018-10-23 11:09:45 +02:00
|
|
|
- docker-engine
|
|
|
|
- python-docker
|
2018-02-13 10:07:24 +01:00
|
|
|
when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'xenial'
|
|
|
|
|
2018-10-23 11:09:45 +02:00
|
|
|
- name: Setup log rotation.
|
|
|
|
copy:
|
|
|
|
src: files/daemon.json
|
|
|
|
dest: /etc/docker/daemon.json
|
|
|
|
tags: ['settings']
|
|
|
|
|
2018-02-13 10:07:24 +01:00
|
|
|
- name: make sure service is started
|
|
|
|
systemd:
|
|
|
|
name: docker.service
|
|
|
|
state: started
|