2015-10-04 04:19:50 +08:00
|
|
|
---
|
|
|
|
- name: Install prerequisites for https transport
|
|
|
|
apt: pkg={{ item }} state=present update_cache=yes
|
|
|
|
with_items:
|
|
|
|
- apt-transport-https
|
|
|
|
- ca-certificates
|
|
|
|
|
|
|
|
- name: Configure docker apt repository
|
2015-11-20 18:18:37 +08:00
|
|
|
template: src=docker.list.j2 dest=/etc/apt/sources.list.d/docker.list backup=yes
|
2015-10-04 04:19:50 +08:00
|
|
|
|
|
|
|
- name: Install docker-engine
|
|
|
|
apt: pkg={{ item }} state=present force=yes update_cache=yes
|
|
|
|
with_items:
|
|
|
|
- aufs-tools
|
|
|
|
- cgroupfs-mount
|
2015-12-11 18:49:39 +08:00
|
|
|
- docker-engine=1.9.1-0~{{ ansible_distribution_release }}
|
2015-10-04 04:19:50 +08:00
|
|
|
|
|
|
|
- name: Copy default docker configuration
|
2015-11-01 18:12:12 +08:00
|
|
|
template: src=default-docker.j2 dest=/etc/default/docker backup=yes
|
2015-10-04 04:19:50 +08:00
|
|
|
notify: restart docker
|
|
|
|
|
|
|
|
- name: Copy Docker systemd unit file
|
2015-11-01 18:12:12 +08:00
|
|
|
copy: src=systemd-docker.service dest=/lib/systemd/system/docker.service backup=yes
|
2015-10-04 04:19:50 +08:00
|
|
|
notify: restart docker
|