2015-10-03 20:19:50 +00: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
|
|
|
|
template: src=docker.list.j2 dest=/etc/apt/sources.list.d/docker.list
|
|
|
|
|
|
|
|
- name: Install docker-engine
|
|
|
|
apt: pkg={{ item }} state=present force=yes update_cache=yes
|
|
|
|
with_items:
|
|
|
|
- aufs-tools
|
|
|
|
- cgroupfs-mount
|
|
|
|
- docker-engine=1.8.2-0~{{ ansible_distribution_release }}
|
|
|
|
|
|
|
|
- name: Copy default docker configuration
|
|
|
|
template: src=default-docker.j2 dest=/etc/default/docker
|
|
|
|
notify: restart docker
|
|
|
|
|
|
|
|
- name: Copy Docker systemd unit file
|
|
|
|
copy: src=systemd-docker.service dest=/lib/systemd/system/docker.service
|
|
|
|
notify: restart docker
|
|
|
|
|
|
|
|
- name: Copy Docker garbage collection script
|
|
|
|
copy: src=docker-gc dest={{ bin_dir }}/docker-gc mode=700
|
2015-10-04 08:55:52 +00:00
|
|
|
when: enable_docker_gc
|
2015-10-03 20:19:50 +00:00
|
|
|
|
|
|
|
- name: Copy Cron for garbage collection script
|
2015-10-05 12:22:36 +00:00
|
|
|
template: src=cron_docker-gc.j2 dest=/etc/cron.hourly/cron_docker-gc mode=755
|
2015-10-04 08:55:52 +00:00
|
|
|
when: enable_docker_gc
|