Python role for ansible. This supports multiple python versions thanks to pythonz.
python_versions
: List of valid python versions to install.virtualenvs
: Dict of virtual environment to create.path
: Virtual environment directory.version
: Virtual environment python version.requirements
: Requirements.txt file to install.pip_version
: Virtual environment pip version (default tolatest
).setuptools_version
: Virtual environment setuptools version (default tolatest
).
pythonz_repo
: Git url to the pythonz repository (default tohttps://github.com/saghul/pythonz.git
).pythonz_version
: Version of pythonz to download (default tomaster
).pip_version
: Pythonz pythons interpreter pip version (default tolatest
).setuptools_version
: Pythonz pythons interpreter setuptools version (default tolatest
).
- role: pyslackers.python
python_versions:
- "3.6.2"
- "3.6.3"
virtualenvs:
env_1:
path: /opt/env_1
version: "3.6.1"
requirements: requirements.txt
env_2:
path: /opt/env_2
version: "3.6.2"
pip_version: "8.0.1"
MIT