| - name: Trust docker apt key |
| apt_key: |
| data={{ lookup('file', 'docker_apt_key.gpg') }} |
| |
| - name: Debian add Docker repository and update apt cache |
| apt_repository: |
| repo: deb https://apt.dockerproject.org/repo ubuntu-{{ debian_version }} main |
| update_cache: yes |
| state: present |
| tags: [docker] |
| |
| - name: Debian Docker is present |
| apt: |
| name: docker-engine |
| state: latest |
| force: yes |
| tags: [docker, skip_ansible_lint] |
| |
| - name: Debian python-pip is present |
| apt: name=python-pip state=present |
| tags: [docker] |
| |
| - name: Debian docker-py is present |
| pip: |
| name: docker-py |
| version: 1.10.6 |
| state: present |
| tags: [docker] |
| |
| - name: Debian files are present |
| template: |
| src: "{{ docker_cfg }}" |
| dest: "{{ docker_cfg_dest }}" |
| tags: [docker] |
| notify: |
| - docker-restart |
| |
| - name: vagrant user is added to the docker group |
| user: |
| name: "{{ ansible_env['SUDO_USER'] }}" |
| group: docker |
| tags: [docker] |
| notify: |
| - docker-restart |