Add immich-sync ansible role for photo library sync #63

Merged
eblume merged 4 commits from feature/immich-sync into main 2026-01-26 12:38:39 -08:00

4 commits

Author SHA1 Message Date
df32bc8f82 Add lockfile to prevent concurrent immich-sync runs
- Creates ~/.immich-sync.lock with PID on start
- Checks if existing lock's process is still running (stale lock detection)
- Logs clear message when skipping due to active lock
- Releases lock on exit via trap (handles success and failure)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 12:34:55 -08:00
e11e84cb20 Fix osxphotos export options
osxphotos exports both original and edited versions by default.
Use --skip-edited and --skip-original-if-edited to control behavior
instead of non-existent --export-edited and --export-originals flags.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 12:20:09 -08:00
dd80724b71 Use explicit paths in immich-sync script for LaunchAgent
LaunchAgents don't inherit PATH, so use explicit paths:
- /opt/homebrew/opt/mise/bin/mise x -- osxphotos (like borgmatic)
- /usr/local/bin/docker for Docker commands

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 12:15:41 -08:00
4e41e1f057 Add immich-sync ansible role for photo library sync
Implements hourly sync from macOS Photos Library to Immich:
- osxphotos exports photos with metadata to staging directory
- immich-cli uploads to Immich via Docker
- LaunchAgent schedules hourly syncs (mcquack pattern)
- API key stored securely from 1Password

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 12:04:39 -08:00