Zack Williams | 8ad44d5 | 2017-06-29 08:40:38 -0700 | [diff] [blame] | 1 | --- |
| 2 | |
Luca Prete | c15c649 | 2017-02-17 11:28:10 -0800 | [diff] [blame] | 3 | - name: Trust docker apt key |
| 4 | apt_key: |
| 5 | data={{ lookup('file', 'docker_apt_key.gpg') }} |
| 6 | |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 7 | - name: Debian add Docker repository and update apt cache |
| 8 | apt_repository: |
Zack Williams | 8ad44d5 | 2017-06-29 08:40:38 -0700 | [diff] [blame] | 9 | repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable" |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 10 | update_cache: yes |
| 11 | state: present |
| 12 | tags: [docker] |
| 13 | |
Zack Williams | 8ad44d5 | 2017-06-29 08:40:38 -0700 | [diff] [blame] | 14 | - name: Install docker-ce using apt |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 15 | apt: |
Zack Williams | 8ad44d5 | 2017-06-29 08:40:38 -0700 | [diff] [blame] | 16 | name: docker-ce=17.06.* |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 17 | force: yes |
David K. Bainbridge | f5ffb0d | 2016-11-04 16:14:54 +0100 | [diff] [blame] | 18 | tags: [docker, skip_ansible_lint] |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 19 | |
| 20 | - name: Debian python-pip is present |
| 21 | apt: name=python-pip state=present |
| 22 | tags: [docker] |
| 23 | |
Zack Williams | 8ad44d5 | 2017-06-29 08:40:38 -0700 | [diff] [blame] | 24 | - name: docker python package present |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 25 | pip: |
Zack Williams | 8ad44d5 | 2017-06-29 08:40:38 -0700 | [diff] [blame] | 26 | name: "docker>=2.4.2" |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 27 | state: present |
| 28 | tags: [docker] |
| 29 | |
| 30 | - name: Debian files are present |
| 31 | template: |
| 32 | src: "{{ docker_cfg }}" |
| 33 | dest: "{{ docker_cfg_dest }}" |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 34 | tags: [docker] |
Zack Williams | dae7ff6 | 2016-11-14 15:20:06 -0700 | [diff] [blame] | 35 | notify: |
| 36 | - docker-restart |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 37 | |
| 38 | - name: vagrant user is added to the docker group |
| 39 | user: |
Andy Bavier | 3833dde | 2016-08-31 16:09:27 -0400 | [diff] [blame] | 40 | name: "{{ ansible_env['SUDO_USER'] }}" |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 41 | group: docker |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 42 | tags: [docker] |
Zack Williams | dae7ff6 | 2016-11-14 15:20:06 -0700 | [diff] [blame] | 43 | notify: |
| 44 | - docker-restart |