r/jellyfin: Enable Prometheus metrics

Jellyfin can expose metrics in Prometheus format, but this functionality
is disabled by default.  To enable it, we must set `EnableMetrics` in
the configuration file.  This commit adds a template configuration file
that uses the `jellyfin_enable_metrics` Ansible variable to control this
value.
This commit is contained in:
2024-11-05 06:21:38 -06:00
parent a9923dcb57
commit 9f30998fbf
3 changed files with 214 additions and 0 deletions

View File

@@ -37,6 +37,28 @@
state: directory
tags:
- datadir
- name: ensure jellyfin configuration directory exists
file:
path: /var/lib/jellyfin/config
owner: jellyfin
group: jellyfin
mode: u=rwx,go=rx
state: directory
tags:
- config
- name: ensure jellyfin system is configured
template:
src: system.xml.j2
dest: /var/lib/jellyfin/config/system.xml
owner: jellyfin
group: jellyfin
mode: u=rw,go=r
tags:
- config
notify:
- restart jellyfin
- name: ensure jellyfin environment is configured
template: