Skip to content

mriamah/uv_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Collection - mriamah.uv

Manage Python versions and installations using the uv Python package manager.

Galaxy Build

Requirements

  • Ansible 2.12 or higher.
  • uv installed and available on PATH and uv version ≥ 0.8.0.

Installation

Install via Ansible Galaxy:

ansible-galaxy collection install mriamah.uv

Collection Contents

This collection provides tools to manage Python versions using the uv python subcommand from the Astral uv package manager.

Modules

python

  • Installs, uninstalls, and upgrades Python versions.
  • Supports three states:
    • present – ensures a specific Python version is installed.
    • absent – removes specified Python version.
    • latest – installs the latest patch version for a minor release.
  • Returns facts for further playbook usage:
    • python_versions (list) - list of versions changed.
    • python_paths (list) - List of installation paths of Python versions changed.

Notes

  • Designed for Ansible 2.12+ and uv ≥ 0.8.0
  • All module operations are idempotent and support check_mode.

Example Usage

- name: Install Python 3.12.3
  mriamah.uv.python:
    version: 3.12.3
    state: present
- name: Remove Python 3.12
  mriamah.uv.python:
    version: 3.12
    state: absent
- name: Install latest patch for 3.12
  mriamah.uv.python:
    version: 3.12
    state: latest

License

GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

References

About

Manage Python versions and installations using the uv Python package manager.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages