1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-24 06:07:19 +00:00

uv_python module: format documentation block

This commit is contained in:
Mariam Ahhttouche 2026-02-24 12:18:21 +01:00
parent b678f5471b
commit 62f94de35c

View file

@ -26,20 +26,20 @@ options:
description: description:
- Desired state of the specified Python version. - Desired state of the specified Python version.
- | - |
C(present) ensures the specified version is installed. V(present) ensures the specified version is installed.
If a full patch version is specified (for example C(3.12.3)), that exact version will be installed if not already present. If a full patch version is specified (for example C(3.12.3)), that exact version will be installed if not already present.
If only a minor version is specified (for example 3.12), the latest available patch version for that minor release is installed only If only a minor version is specified (for example 3.12), the latest available patch version for that minor release is installed only
if no patch version for that minor release is currently installed (including patch versions not managed by C(uv)). if no patch version for that minor release is currently installed (including patch versions not managed by C(uv)).
RV(python_versions) and RV(python_paths) lengths are always equal to one for this state. RV(python_versions) and RV(python_paths) lengths are always equal to one for this state.
This state uses C(uv python install) command. This state uses C(uv python install) command.
- | - |
C(absent) ensures the specified version is removed. If a full patch version is specified, only that exact patch version is removed. V(absent) ensures the specified version is removed. If a full patch version is specified, only that exact patch version is removed.
If only a minor version is specified (for example C(3.12)), all installed patch versions for that minor release are removed. If only a minor version is specified (for example C(3.12)), all installed patch versions for that minor release are removed.
If the specified version is not installed, no changes are made. RV(python_versions) and RV(python_paths) If the specified version is not installed, no changes are made. RV(python_versions) and RV(python_paths)
lengths can be higher or equal to one for this state. lengths can be higher or equal to one for this state.
This state uses C(uv python uninstall) command. This state uses C(uv python uninstall) command.
- | - |
C(latest) ensures the latest available patch version for the specified version is installed. V(latest) ensures the latest available patch version for the specified version is installed.
If only a minor version is specified (for example C(3.12)), the latest available patch version for that minor release is always installed. If only a minor version is specified (for example C(3.12)), the latest available patch version for that minor release is always installed.
If another patch version is already installed but is not the latest, the latest patch version is installed. If another patch version is already installed but is not the latest, the latest patch version is installed.
The latest patch version installed depends on the C(uv) version, since available Python versions are frozen per C(uv) release. The latest patch version installed depends on the C(uv) version, since available Python versions are frozen per C(uv) release.
@ -50,19 +50,19 @@ options:
default: present default: present
attributes: attributes:
check_mode: check_mode:
description: Can run in check_mode and return changed status prediction without modifying target. description: Can run in check_mode and return changed status prediction without modifying target.
support: full support: full
diff_mode: diff_mode:
description: Returns details on what has changed (or possibly needs changing in check_mode), when in diff mode. description: Returns details on what has changed (or possibly needs changing in check_mode), when in diff mode.
support: none support: none
notes: notes:
seealso: seealso:
- name: uv documentation - name: uv documentation
description: Python versions management with uv. description: Python versions management with uv.
link: https://docs.astral.sh/uv/concepts/python-versions/ link: https://docs.astral.sh/uv/concepts/python-versions/
- name: uv CLI documentation - name: uv CLI documentation
description: uv CLI reference guide. description: uv CLI reference guide.
link: https://docs.astral.sh/uv/reference/cli/#uv-python link: https://docs.astral.sh/uv/reference/cli/#uv-python
author: Mariam Ahhttouche (@mriamah) author: Mariam Ahhttouche (@mriamah)
''' '''