Make venv use python3 instead of more specific version #60

Closed
opened 2026-01-03 16:11:52 +01:00 by june · 1 comment
Owner

Make the venv in the ansible_pull role use python3 instead of a more specific version, so that then an OS and therefore Python upgrade then hopefully doesn't break the venv anymore. This issue has been encountered on upgrading a host to trixie.
Setting the following should fix it: https://docs.ansible.com/projects/ansible/latest/collections/ansible/builtin/pip_module.html#parameter-virtualenv_python

Make the venv in the `ansible_pull` role use `python3` instead of a more specific version, so that then an OS and therefore Python upgrade then hopefully doesn't break the venv anymore. This issue has been encountered on upgrading a host to trixie. Setting the following should fix it: https://docs.ansible.com/projects/ansible/latest/collections/ansible/builtin/pip_module.html#parameter-virtualenv_python
Author
Owner

Seems like this could work, tho internally in the venv the old Python version should stay a specific one, so just re-create the venv on major upgrade.

Seems like this could work, tho internally in the venv the old Python version should stay a specific one, so just re-create the venv on major upgrade.
june closed this issue 2026-01-12 23:16:59 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
CCCHH/ansible-infra#60
No description provided.