ANXS - python
Ansible role for installing Python 3, pip, and virtualenv from system packages, with optional support for additional Python versions via the deadsnakes PPA and the uv package manager.
- Ansible 2.13 or higher.
- Ubuntu 22.04+ or Debian 12+.
Two commonly adjusted variables. See defaults/main.yml for the full set.
python_versions(default empty list) is a list of additional Python versions to install from the deadsnakes PPA.python_uv_install(default false) to installuvpackage manager.
Tests use Molecule with Docker and Testinfra. Run the full suite with make test, or target a specific platform (e.g. make test-ubuntu2404).
The test suite covers Python 3 and pip package installation, virtualenv creation, uv binary installation and architecture detection, and file permissions. Tests run across all supported Linux distributions.
This project has been developed with AI assistance. Contributions making use of AI generated content are welcome, however they must be human reviewed prior to submission as pull requests, or issues. All contributors must be able to fully explain and defend any AI generated code, documentation, issues, or tests they submit. Contributions making use of AI must have this explicitly declared in the pull request or issue. This also applies to utilization of AI for reviewing of pull requests.
Are all welcome!