blob: f58c0c721005692c8b494bdb73ea40faff81f03a [file] [log] [blame]
Luca Pretec15c6492017-02-17 11:28:10 -08001- name: Trust docker apt key
2 apt_key:
3 data={{ lookup('file', 'docker_apt_key.gpg') }}
4
Zsolt Harasztiec7df102016-05-05 13:34:18 -07005- name: Debian add Docker repository and update apt cache
6 apt_repository:
David K. Bainbridge31d08c22016-10-27 17:34:56 -07007 repo: deb https://apt.dockerproject.org/repo ubuntu-{{ debian_version }} main
Zsolt Harasztiec7df102016-05-05 13:34:18 -07008 update_cache: yes
9 state: present
10 tags: [docker]
11
12- name: Debian Docker is present
13 apt:
14 name: docker-engine
15 state: latest
16 force: yes
David K. Bainbridgef5ffb0d2016-11-04 16:14:54 +010017 tags: [docker, skip_ansible_lint]
Zsolt Harasztiec7df102016-05-05 13:34:18 -070018
19- name: Debian python-pip is present
20 apt: name=python-pip state=present
21 tags: [docker]
22
23- name: Debian docker-py is present
24 pip:
25 name: docker-py
Andy Bavier96df5e62017-03-13 18:19:24 -040026 version: 1.10.6
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