Ansible role to install packages for developing in Python using Cookiecutter Hypermodern Python.
Installs:
- Cookiecutter
- Nox
- Pipx
- Poetry
- pre-commit
- PyCharm (optional)
- pyenv
- Visual Studio Code (optional)
None.
Here is the list of all variables and their default values:
- pyenv_global: optional list of Python global versions for pyenv (from staticdev.pyenv)
- pyenv_python_versions: optional list of Python versions installed (from staticdev.pyenv)
- install_pycharm: false
- pycharm_flavor: community. You can use also professional or edu
- install_vscode: false
- vscode_extensions: optional list of name_ids of extensions. eg.: ms-python.python (Python Official Extension)
- staticdev.pyenv
- gantsign.visual-studio-code (optional)
Here are some common usages of this role.
- Role without IDE:
- hosts: all
roles:
- role: staticdev.python-developer- Role defining Python versions:
- hosts: all
roles:
- role: staticdev.python-developer
vars:
pyenv_global:
- "3.10.0"
pyenv_python_versions:
- "3.10.0"
- "3.9.9"- Role with Pycharm
- hosts: all
roles:
- role: staticdev.python-developer
vars:
install_pycharm: true
pycharm_flavor: edu- Role with vscode and extensions
- hosts: all
roles:
- role: staticdev.python-developer
vars:
install_vscode: true
vscode_extensions:
- ms-python.python
- ms-python.vscode-pylance
- shan.code-settings-syncContributions are very welcome. To learn more, see the Contributor Guide.
Distributed under the terms of the MIT license, Ansible role Python developer is free and open source software.