blob: 644bd80921955cad9bd043d295f80f6775bcb089 [file] [log] [blame]
David K. Bainbridge317e7d72016-05-11 08:31:44 -07001- name: Apt Information
2 become: yes
David K. Bainbridge17248c02016-08-29 17:04:34 -07003 apt: name={{ item }} state=present force=yes
David K. Bainbridge317e7d72016-05-11 08:31:44 -07004 with_items:
David K. Bainbridge17248c02016-08-29 17:04:34 -07005 - apt-transport-https=1.0*
6 - ca-certificates=20160104*
David K. Bainbridge317e7d72016-05-11 08:31:44 -07007
8- name: Docker Apt Key
9 become: yes
10 apt_key:
11 keyserver: hkp://p80.pool.sks-keyservers.net:80
12 id: 58118E89F3A912897C070ADBF76221572C52609D
13
14- name: Docker repository
15 become: yes
16 apt_repository:
17 repo: deb https://apt.dockerproject.org/repo ubuntu-trusty main
18 update_cache: yes
19 state: present
20
21- name: Docker Engine
22 become: yes
23 apt:
David K. Bainbridge17248c02016-08-29 17:04:34 -070024 name: docker-engine=1.12*
25 state: present
David K. Bainbridge317e7d72016-05-11 08:31:44 -070026 force: yes
27
David K. Bainbridgef62e70d2016-06-13 17:23:01 -070028- name: Docker Exposed via TCP
David K. Bainbridge2a804222016-05-16 12:36:32 -070029 become: yes
30 lineinfile:
31 dest=/etc/default/docker
32 state=present
33 insertafter='#DOCKER_OPTS'
34 line='DOCKER_OPTS="-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"'
35 register: docker_config
36
37- name: Docker Restart
38 become: yes
39 service:
40 name=docker
41 state=restarted
42 when: docker_config.changed
43
David K. Bainbridge2a804222016-05-16 12:36:32 -070044- name: Enable Docker for User
45 become: yes
46 user:
47 name={{ ansible_user }}
48 group=docker
49 append=yes
50
David K. Bainbridge317e7d72016-05-11 08:31:44 -070051- name: Docker Compose
52 become: yes
53 get_url:
David K. Bainbridge2a804222016-05-16 12:36:32 -070054 url=https://github.com/docker/compose/releases/download/1.7.1/docker-compose-Linux-x86_64
55 dest=/usr/local/bin/docker-compose
56 owner=root
57 group=root
58 mode=0755