[UPD] Add python module docker install from PyPI

This commit is contained in:
Carrol Cox 2019-11-20 10:24:25 +05:00
parent 7f11aeed8a
commit 5a284dc477
3 changed files with 25 additions and 0 deletions

View File

@ -22,6 +22,9 @@ lazydocker_version: '0.7.4'
lazydocker_path: '/usr/local/bin/lazydocker'
lazydocker_url: "https://github.com/jesseduffield/lazydocker/releases/download/v{{ lazydocker_version }}/lazydocker_{{ lazydocker_version }}_Linux_x86_64.tar.gz"
# Python module for docker
docker_pip_install: true
# Used only for Debian/Ubuntu. Switch 'stable' to 'edge' if needed.
docker_apt_release_channel: stable
docker_apt_arch: amd64

View File

@ -0,0 +1,18 @@
---
- name: Install docker-py module
pip:
name:
- docker-py
state: latest
extra_args: "--no-cache-dir"
when:
- ansible_python_version is version('2.6', '<=')
- name: Install docker module
pip:
name:
- docker
state: latest
extra_args: "--no-cache-dir"
when:
- ansible_python_version is version('2.6', '>')

View File

@ -51,6 +51,10 @@
when:
- lazydocker_install | bool
- include_tasks: docker-pip-install.yml
when:
- docker_pip_install | bool
- include_tasks: docker-users.yml
when:
- docker_users | length > 0