Install the backend on every run, not on a checkout change
The role left musicdolphin with an empty venv and a service crash-looping on
ModuleNotFoundError while ansible reported failed=0, because installing the
backend hung off a handler notified by the git checkout:
- the run where the checkout changed failed later on, so handlers never
flushed and the notification was dropped;
- the next run found the checkout already current, notified nothing, and
installed nothing.
Nothing ever converges from there. Make it an ordinary task that runs every
time - uv is fast when there is nothing to do, and its output says whether it
actually installed anything, so a restart is still only notified on a real
change. Give the frontend the same treatment with a cheap stat, since the build
chain has the identical hole and a device with no dist serves no UI.
Also add libjpeg-dev and zlib1g-dev: Raspberry Pi OS has a 32-bit userland,
Pillow publishes no armv7 wheel, and uv therefore builds it from source.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,4 @@
|
||||
---
|
||||
- name: Reinstall musicmouse backend
|
||||
ansible.builtin.command:
|
||||
cmd: "/usr/local/bin/uv pip install --python /opt/musicmouse/.venv/bin/python /opt/musicmouse/python-backend"
|
||||
changed_when: true
|
||||
notify: Restart musicmouse
|
||||
|
||||
- name: Build frontend
|
||||
ansible.builtin.command:
|
||||
cmd: npm ci
|
||||
|
||||
Reference in New Issue
Block a user