Ray's Knowledge Base
Unlock

Host tools fail under the deployer because uv run puts the venv bin first in PATH

PitfallVerified 13 Oct 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

ssh rayandrew@pve sudo lab-deploy apply-host stopped with "ansible on pve failed". The Ansible handler that runs ifreload (the tool that reloads the host network) failed. The same step may work in a normal shell.

Cause#

The deployer starts Ansible with uv run. uv run puts the venv's bin directory first in PATH. A handler that calls a system tool such as ifreload then sees the wrong environment.

Fix#

Give the handler the system PATH. The fix was committed as fix(pve_network): system PATH for ifreload under the deployer, in ansible/roles/pve_network/handlers/main.yml. The new bridge vmbr9 was loaded once by hand with sudo ifreload -a, which is safe because it only adds the new bridge.

Evidence#

The agent said: "The deployer starts Ansible with uv run, and that puts the venv's bin first in PATH. I give the handler the system PATH." The first failure was reported as: "ifreload (the tool that reloads the host network) failed."