blumeops/ansible/roles/immich_sync/defaults/main.yml
Erich Blume 54945be0e3 Add immich-sync ansible role for photo library sync (#63)
## Summary
- Add `immich_sync` role that syncs macOS Photos Library to Immich
- Uses osxphotos to export photos with metadata to staging directory
- Uses immich-cli (via Docker) to upload to Immich server
- LaunchAgent schedules hourly syncs following mcquack pattern
- API key fetched from 1Password in playbook pre_tasks

## Architecture
```
Photos Library → osxphotos export → ~/Pictures/immich-export/ → immich-cli upload → Immich
```

## Prerequisites (manual)
- Install osxphotos on indri: Add `"pipx:osxphotos" = "latest"` to `~/.config/mise/config.toml`, run `mise install`
- Docker is already installed on indri

## Deployment and Testing
- [ ] Dry run: `mise run provision-indri -- --tags immich_sync --check --diff`
- [ ] Deploy: `mise run provision-indri -- --tags immich_sync`
- [ ] Verify LaunchAgent: `ssh indri 'launchctl list | grep immich'`
- [ ] Test manual sync: `ssh indri '~/bin/immich-sync.sh'`
- [ ] Check logs: `ssh indri 'tail -50 ~/Library/Logs/mcquack.immich-sync.out.log'`
- [ ] Verify photos in Immich at https://photos.ops.eblu.me

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Reviewed-on: https://forge.ops.eblu.me/eblume/blumeops/pulls/63
2026-01-26 12:38:38 -08:00

20 lines
715 B
YAML

---
# Immich server URL
immich_sync_url: "https://photos.ops.eblu.me"
# Directory paths
immich_sync_export_dir: /Users/erichblume/Pictures/immich-export
immich_sync_log_dir: /Users/erichblume/Library/Logs
immich_sync_bin_dir: /Users/erichblume/bin
# Schedule: hourly (StartInterval in seconds)
immich_sync_interval_seconds: 3600
# osxphotos export options
immich_sync_export_edited: true # Export edited versions
immich_sync_export_originals: true # Also export originals (as sidecars)
immich_sync_update_mode: true # Only export new/changed photos
# immich-cli options
immich_sync_create_albums: true # Create albums from folder names
immich_sync_concurrency: 4 # Parallel uploads