blob: a0383a2bbce933b366e800c32001ff37e5bc85c8 [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:
David K. Bainbridgeca68f062016-10-27 11:04:33 -070011 data="{{ lookup('file', 'docker_apt_key.gpg') }}"
David K. Bainbridge317e7d72016-05-11 08:31:44 -070012
13- name: Docker repository
14 become: yes
15 apt_repository:
David K. Bainbridgeca68f062016-10-27 11:04:33 -070016 repo: "{{ docker_apt_repo | default('deb https://apt.dockerproject.org/repo ubuntu-trusty main') }}"
David K. Bainbridge317e7d72016-05-11 08:31:44 -070017 update_cache: yes
18 state: present
19
20- name: Docker Engine
21 become: yes
22 apt:
David K. Bainbridge17248c02016-08-29 17:04:34 -070023 name: docker-engine=1.12*
24 state: present
David K. Bainbridge317e7d72016-05-11 08:31:44 -070025 force: yes
26
David K. Bainbridgef62e70d2016-06-13 17:23:01 -070027- name: Docker Exposed via TCP
David K. Bainbridge2a804222016-05-16 12:36:32 -070028 become: yes
29 lineinfile:
30 dest=/etc/default/docker
31 state=present
32 insertafter='#DOCKER_OPTS'
David K. Bainbridge8b179042016-11-30 15:38:42 -080033 line='DOCKER_OPTS="-H unix:///var/run/docker.sock"'
David K. Bainbridge2a804222016-05-16 12:36:32 -070034 register: docker_config
35
36- name: Docker Restart
37 become: yes
38 service:
39 name=docker
40 state=restarted
41 when: docker_config.changed
42
David K. Bainbridge2a804222016-05-16 12:36:32 -070043- name: Enable Docker for User
44 become: yes
45 user:
46 name={{ ansible_user }}
47 group=docker
48 append=yes
49
David K. Bainbridge317e7d72016-05-11 08:31:44 -070050- name: Docker Compose
51 become: yes
52 get_url:
David K. Bainbridge2a804222016-05-16 12:36:32 -070053 url=https://github.com/docker/compose/releases/download/1.7.1/docker-compose-Linux-x86_64
54 dest=/usr/local/bin/docker-compose
55 owner=root
56 group=root
David K. Bainbridge8b179042016-11-30 15:38:42 -080057 mode="0755"