The previous fix made the install convergent but not idempotent: it keyed "changed" off uv printing "Installed", and uv prints that every single run. musicmouse is a local path dependency, so uv rebuilds and reinstalls it every time regardless. Every ansible run therefore restarted the service and made it rescan the whole library for nothing. Decide from the device instead: the commit the checkout landed on, recorded in the venv, plus whether the venv can import the package at all. That keeps the convergence the handler lacked - an empty venv reinstalls even when the commit matches - without touching anything on a run where nothing moved. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
8.4 KiB
8.4 KiB