blob: df8c270e9e38e6f99de8654a0dfdbe943f1f9567 [file] [log] [blame]
Zack Williams8ad44d52017-06-29 08:40:38 -07001---
2
Luca Pretec15c6492017-02-17 11:28:10 -08003- name: Trust docker apt key
4 apt_key:
5 data={{ lookup('file', 'docker_apt_key.gpg') }}
6
Zsolt Harasztiec7df102016-05-05 13:34:18 -07007- name: Debian add Docker repository and update apt cache
8 apt_repository:
Zack Williams8ad44d52017-06-29 08:40:38 -07009 repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
Zsolt Harasztiec7df102016-05-05 13:34:18 -070010 update_cache: yes
11 state: present
12 tags: [docker]
13
Zack Williams8ad44d52017-06-29 08:40:38 -070014- name: Install docker-ce using apt
Zsolt Harasztiec7df102016-05-05 13:34:18 -070015 apt:
Zack Williams8ad44d52017-06-29 08:40:38 -070016 name: docker-ce=17.06.*
Zsolt Harasztiec7df102016-05-05 13:34:18 -070017 force: yes
David K. Bainbridgef5ffb0d2016-11-04 16:14:54 +010018 tags: [docker, skip_ansible_lint]
Zsolt Harasztiec7df102016-05-05 13:34:18 -070019
20- name: Debian python-pip is present
21 apt: name=python-pip state=present
22 tags: [docker]
23
Zack Williams8ad44d52017-06-29 08:40:38 -070024- name: docker python package present
Zsolt Harasztiec7df102016-05-05 13:34:18 -070025 pip:
Zack Williams8ad44d52017-06-29 08:40:38 -070026 name: "docker>=2.4.2"
Zsolt Harasztiec7df102016-05-05 13:34:18 -070027 state: present
28 tags: [docker]
29
30- name: Debian files are present
31 template:
32 src: "{{ docker_cfg }}"
33 dest: "{{ docker_cfg_dest }}"
Zsolt Harasztiec7df102016-05-05 13:34:18 -070034 tags: [docker]
Zack Williamsdae7ff62016-11-14 15:20:06 -070035 notify:
36 - docker-restart
Zsolt Harasztiec7df102016-05-05 13:34:18 -070037
38- name: vagrant user is added to the docker group
39 user:
Andy Bavier3833dde2016-08-31 16:09:27 -040040 name: "{{ ansible_env['SUDO_USER'] }}"
Zsolt Harasztiec7df102016-05-05 13:34:18 -070041 group: docker
Zsolt Harasztiec7df102016-05-05 13:34:18 -070042 tags: [docker]
Zack Williamsdae7ff62016-11-14 15:20:06 -070043 notify:
44 - docker-restart