| - name: Debian add Docker repository and update apt cache |
| repo: deb https://apt.dockerproject.org/repo ubuntu-{{ debian_version }} main |
| - name: Debian Docker is present |
| - name: Debian python-pip is present |
| apt: name=python-pip state=present |
| - name: Debian docker-py is present |
| - name: netifaces pip package is present |
| - name: Debian files are present |
| dest: "{{ docker_cfg_dest }}" |
| - name: Debian Daemon is reloaded |
| command: systemctl daemon-reload |
| when: copy_result|changed and is_systemd is defined |
| - name: vagrant user is added to the docker group |
| name: "{{ ansible_env['SUDO_USER'] }}" |
| - name: Debian Docker service is restarted |
| when: copy_result|changed or user_result|changed |