chore(ansible): use project-local uv venv for ansible runtime deps
Moves the local ansible runtime from a global `uv tool install ansible-core`
(which required remembering `--with kubernetes --with jmespath --with dnspython`)
to a project-managed venv described by `pyproject.toml` + `uv.lock`. Fixes the
"Failed to import the required Python library (kubernetes)" error on localhost.
The localhost inventory entry now derives `ansible_python_interpreter` from
`{{ ansible_playbook_python }}`, so `uv run ansible-playbook` is enough — no
more hardcoded user-specific paths.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
11
pyproject.toml
Normal file
11
pyproject.toml
Normal file
@@ -0,0 +1,11 @@
|
||||
[project]
|
||||
name = "arcodange-factory"
|
||||
version = "0.0.0"
|
||||
description = "Ansible automation for the Arcodange factory homelab"
|
||||
requires-python = ">=3.12,<3.13"
|
||||
dependencies = [
|
||||
"ansible-core",
|
||||
"kubernetes",
|
||||
"jmespath",
|
||||
"dnspython",
|
||||
]
|
||||
Reference in New Issue
Block a user