Luca Prete | c15c649 | 2017-02-17 11:28:10 -0800 | [diff] [blame] | 1 | - name: Trust docker apt key |
| 2 | apt_key: |
| 3 | data={{ lookup('file', 'docker_apt_key.gpg') }} |
| 4 | |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 5 | - name: Debian add Docker repository and update apt cache |
| 6 | apt_repository: |
David K. Bainbridge | 31d08c2 | 2016-10-27 17:34:56 -0700 | [diff] [blame] | 7 | repo: deb https://apt.dockerproject.org/repo ubuntu-{{ debian_version }} main |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 8 | 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. Bainbridge | f5ffb0d | 2016-11-04 16:14:54 +0100 | [diff] [blame] | 17 | tags: [docker, skip_ansible_lint] |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 18 | |
| 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 |
| 26 | version: 1.6.0 |
| 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 |
Zsolt Haraszti | ec7df10 | 2016-05-05 13:34:18 -0700 | [diff] [blame] | 45 | |