Files
ansible/roles/pi_musicmouse/defaults/main.yml
Martin Bauer 9bd23467f0 Build the venv from the distribution's Python instead of uv
The backend now targets 3.11, which is what Raspberry Pi OS ships, so there is
nothing left for uv to solve. It was only ever there to obtain a 3.13 the distro
does not have, and it brought its own problems: the download had to be matched
to the Pi's 32-bit userland by hand, and no armv7 wheel exists for a 3.13 ABI,
so Pillow was compiled from source and needed image headers installed alongside.

apt for the interpreter, python3 -m venv, pip for the rest - and piwheels then
supplies prebuilt armhf wheels for the native dependencies.

A venv cannot be migrated between interpreters (it holds absolute paths into the
one that made it), and `creates:` would keep the old one forever, so check what
built it and rebuild when it does not match the current python3. That is what
carries a device off the uv-installed 3.13 without hand-holding.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 21:21:12 +02:00

32 lines
1.7 KiB
YAML

---
pi_musicmouse_repo: "ssh://git@git.bauer.tech:2222/martin/musicmouse.git"
# No default on purpose: which branch to run is a per-host decision, set in host_vars.
# The deploy/<host> branches on the remote are the intended values - move one with
# `git push -f origin <branch>:deploy/musicdolphin` and re-run this role.
# musicmouse_version: "deploy/musicdolphin"
# Where to check out the repo on the *control machine* to build the frontend (npm isn't
# installed on the Pi - see README). Keyed by version so different hosts on different
# versions don't clobber each other's build.
pi_musicmouse_build_cache: "/tmp/musicmouse-build-cache"
# Which files/config-*.yml to install as this host's /media/musicmouse/config.yml.
pi_musicmouse_config_file: "config-{{ inventory_hostname }}.yml"
# The app owns config.yml at runtime: parent mode writes the volume keys back to it, and
# the remote-control page rewrites its `remote:` block. So the config is installed once
# and then left alone, or every ansible run would silently undo those edits. Push a
# changed config deliberately:
#
# just run mediapis.yml musicdolphin -e pi_musicmouse_force_config=true
pi_musicmouse_force_config: false
# The typing game's lesson plan, installed next to config.yml. A config with a `tippen:`
# section will not start without it - curriculum_file is validated as must-exist. Set to
# "" for a host whose config has no tippen section.
pi_musicmouse_curriculum_file: "tippen-curriculum.yml"
# The commit the checkout task actually landed on, used to decide whether the venv
# needs rebuilding. Empty under --check, where the git task reports without writing.
pi_musicmouse_commit: "{{ pi_musicmouse_checkout.after | default('') }}"