fix(erpnext): symlink ansible binaries to /usr/local/bin

bench setup role spawns a subprocess that checks for ansible on
PATH. The binaries are inside the uv venv and not discoverable.
Symlink ansible* to /usr/local/bin/ to make them available.
This commit is contained in:
CanbiZ (MickLesk)
2026-03-25 15:56:35 +01:00
parent 61b8d3e088
commit 8c9c69aa22

View File

@@ -85,6 +85,7 @@ msg_info "Setting up Production"
BENCH_VENV="/home/frappe/.local/share/uv/tools/frappe-bench"
$STD curl -fsSL https://bootstrap.pypa.io/get-pip.py | "${BENCH_VENV}/bin/python"
$STD "${BENCH_VENV}/bin/python" -m pip install ansible
ln -sf "${BENCH_VENV}"/bin/ansible* /usr/local/bin/
$STD bash -c 'export PATH="/home/frappe/.local/bin:$PATH"; cd /opt/frappe-bench && bench setup production frappe --yes'
$STD systemctl enable --now supervisor
msg_ok "Set up Production"