blob: 7b6f2e69ab3c5920c495a40cde37f0c60f690ebb [file] [log] [blame]
- name: Apt Information
become: yes
apt: name={{ item }} state=present force=yes
with_items:
- apt-transport-https=1.0*
- ca-certificates=20160104*
- name: Docker Apt Key
become: yes
apt_key:
data="{{ lookup('file', 'docker_apt_key.gpg') }}"
- name: Docker repository
become: yes
apt_repository:
repo: "{{ docker_apt_repo | default('deb https://apt.dockerproject.org/repo ubuntu-trusty main') }}"
update_cache: yes
state: present
- name: Docker Engine
become: yes
apt:
name: docker-engine=1.12*
state: present
force: yes
- name: Docker Exposed via TCP
become: yes
lineinfile:
dest=/etc/default/docker
state=present
insertafter='#DOCKER_OPTS'
line='DOCKER_OPTS="-H unix:///var/run/docker.sock"'
register: docker_config
- name: Docker Restart
become: yes
service:
name=docker
state=restarted
when: docker_config.changed
- name: Enable Docker for User
become: yes
user:
name={{ ansible_user }}
group=docker
append=yes
- name: Docker Compose
become: yes
get_url:
url: https://github.com/docker/compose/releases/download/1.7.1/docker-compose-Linux-x86_64
checksum: "sha256:3166bb74bc648e68c3154bc704fddf6bccf59f03a0c90fc48aefac034535e4ae"
dest: /usr/local/bin/docker-compose
owner: root
group: root
mode: "0755"