blob: 94196616dc380d2759fc664bed8a70b9c73b1f34 [file] [log] [blame]
Zack Williams4d09b3b2017-04-12 22:39:15 -07001---
2
3- name: Prereqs and SSL support for apt for SSL
David K. Bainbridge317e7d72016-05-11 08:31:44 -07004 become: yes
Zack Williams4d09b3b2017-04-12 22:39:15 -07005 apt:
6 name: "{{ item }}"
7 update_cache: yes
8 cache_valid_time: 3600
David K. Bainbridge317e7d72016-05-11 08:31:44 -07009 with_items:
Zack Williams4d09b3b2017-04-12 22:39:15 -070010 - apt-transport-https
11 - ca-certificates
12 - python-pip
David K. Bainbridge317e7d72016-05-11 08:31:44 -070013
14- name: Docker Apt Key
15 become: yes
16 apt_key:
Zack Williams4d09b3b2017-04-12 22:39:15 -070017 data: "{{ lookup('file', 'docker_apt_key.gpg') }}"
David K. Bainbridge317e7d72016-05-11 08:31:44 -070018
19- name: Docker repository
20 become: yes
21 apt_repository:
Zack Williams4d09b3b2017-04-12 22:39:15 -070022 repo: "{{ docker_apt_repo }}"
David K. Bainbridge317e7d72016-05-11 08:31:44 -070023
Zack Williams4d09b3b2017-04-12 22:39:15 -070024- name: Install docker engine
David K. Bainbridge317e7d72016-05-11 08:31:44 -070025 become: yes
26 apt:
David K. Bainbridge17248c02016-08-29 17:04:34 -070027 name: docker-engine=1.12*
David K. Bainbridge317e7d72016-05-11 08:31:44 -070028 force: yes
Zack Williams4d09b3b2017-04-12 22:39:15 -070029 update_cache: yes
30 cache_valid_time: 3600
David K. Bainbridge317e7d72016-05-11 08:31:44 -070031
Zack Williams4d09b3b2017-04-12 22:39:15 -070032# docker fails without docker-py, docker-compose >1.9 fails with docker-py installed
Andy Bavierb79101e2017-06-14 17:28:30 -070033- name: Install docker-compose
Zack Williams4d09b3b2017-04-12 22:39:15 -070034 become: yes
35 pip:
36 name: "{{ item }}"
37 with_items:
38 - docker-py
39 - docker-compose==1.9
40
41- name: Make current user part of the Docker group
David K. Bainbridge2a804222016-05-16 12:36:32 -070042 become: yes
43 user:
Zack Williams4d09b3b2017-04-12 22:39:15 -070044 name: "{{ ansible_user_id }}"
45 groups: "docker"
46 append: yes
David K. Bainbridge2a804222016-05-16 12:36:32 -070047