## Summary - Add Jellyfin ansible role for native macOS deployment via Homebrew cask - Add jellyfin_metrics role for Prometheus textfile metrics collection - Add Caddy routing for jellyfin.ops.eblu.me - Add Alloy log collection for Jellyfin stdout/stderr - Add Grafana dashboard for Jellyfin monitoring ## Architecture Jellyfin runs natively on indri (not in k8s) for full VideoToolbox hardware transcoding support. The M1 Mac Mini can handle ~3 concurrent 4K HDR→SDR transcoding streams. ## Deployment and Testing - [ ] Deploy Jellyfin: `mise run provision-indri -- --tags jellyfin,jellyfin_metrics,caddy,alloy` - [ ] Sync Grafana dashboard: `argocd app sync grafana-config` - [ ] Complete Jellyfin setup wizard at https://jellyfin.ops.eblu.me - [ ] Generate API key and save to `~/.jellyfin-api-key` - [ ] Add media libraries (/Volumes/allisonflix/Movies, /Volumes/allisonflix/TV) - [ ] Enable VideoToolbox hardware transcoding - [ ] Verify metrics in Grafana dashboard - [ ] Verify logs in Loki: `{service="jellyfin"}` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: https://forge.ops.eblu.me/eblume/blumeops/pulls/77
55 lines
1.8 KiB
YAML
55 lines
1.8 KiB
YAML
---
|
|
- name: Fetch Jellyfin API key (when running with --tags jellyfin_metrics)
|
|
ansible.builtin.command:
|
|
cmd: op --vault vg6xf6vvfmoh5hqjjhlhbeoaie item get ceywxkcd3z7najsy2nmmbs2vke --fields credential --reveal
|
|
delegate_to: localhost
|
|
register: jellyfin_metrics_api_key_fallback
|
|
changed_when: false
|
|
no_log: true
|
|
check_mode: false
|
|
when: jellyfin_metrics_api_key is not defined
|
|
|
|
- name: Set Jellyfin API key fact (fallback)
|
|
ansible.builtin.set_fact:
|
|
jellyfin_metrics_api_key: "{{ jellyfin_metrics_api_key_fallback.stdout }}"
|
|
no_log: true
|
|
when: jellyfin_metrics_api_key is not defined
|
|
|
|
- name: Write Jellyfin API key file
|
|
ansible.builtin.copy:
|
|
content: "{{ jellyfin_metrics_api_key }}"
|
|
dest: "{{ jellyfin_metrics_api_key_file }}"
|
|
mode: '0600'
|
|
no_log: true
|
|
|
|
- name: Ensure bin directory exists
|
|
ansible.builtin.file:
|
|
path: "{{ jellyfin_metrics_script | dirname }}"
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: Deploy jellyfin metrics collection script
|
|
ansible.builtin.template:
|
|
src: jellyfin-metrics.sh.j2
|
|
dest: "{{ jellyfin_metrics_script }}"
|
|
mode: '0755'
|
|
notify: Reload jellyfin-metrics
|
|
|
|
- name: Deploy jellyfin-metrics LaunchAgent plist
|
|
ansible.builtin.template:
|
|
src: jellyfin-metrics.plist.j2
|
|
dest: ~/Library/LaunchAgents/mcquack.eblume.jellyfin-metrics.plist
|
|
mode: '0644'
|
|
notify: Reload jellyfin-metrics
|
|
|
|
- name: Check if jellyfin-metrics LaunchAgent is loaded
|
|
ansible.builtin.command: launchctl list mcquack.eblume.jellyfin-metrics
|
|
register: jellyfin_metrics_launchctl_check
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: Load jellyfin-metrics LaunchAgent if not loaded
|
|
ansible.builtin.command: launchctl load ~/Library/LaunchAgents/mcquack.eblume.jellyfin-metrics.plist
|
|
when: jellyfin_metrics_launchctl_check.rc != 0
|
|
changed_when: true
|
|
failed_when: false
|