| - name: Debian add Docker repository and update apt cache |
| repo: deb https://apt.dockerproject.org/repo ubuntu-{{ debian_version }} main |
| when: target == "installer" |
| - name: Debian Docker is present |
| when: target == "installer" |
| - name: Debian python-pip is present |
| when: target == "installer" |
| - name: Debian docker-py is present |
| version: "{{ docker_py_version }}" |
| when: target == "installer" |
| - name: netifaces pip package is present |
| version: "{{ netifaces_version }}" |
| when: target == "installer" |
| - name: Docker config 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: Sudo 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 |