Ansible role for installing Jellyfin
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Simon Cornet f42de7916d
All checks were successful
ci/woodpecker/push/linting Pipeline was successful
docs: improve readme
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 17:29:40 +02:00
.woodpecker chore(package): update cr.simoncor.net/dockerhub/davidanson/markdownlint-cli2 docker tag to v0.23.3 2026-09-20 05:48:39 +00:00
meta feat: move deps to playbook 2026-05-08 15:44:26 +02:00
roles ci: migrate from gitlab ci to woodpecker 2026-05-15 14:31:02 +02:00
tasks feat: update jellyfin to v12 2026-09-11 08:11:56 +02:00
.ansible-lint fix: exclude only sops yml files from lint 2026-07-14 16:23:43 +02:00
.editorconfig chore: add .editorconfig and .gitattributes 2026-05-27 14:23:47 +02:00
.gitattributes chore: add .editorconfig and .gitattributes 2026-05-27 14:23:47 +02:00
.gitignore feat: initial commit 2025-10-22 11:52:59 +02:00
.markdownlint-cli2.jsonc ci: migrate from gitlab ci to woodpecker 2026-05-15 14:31:02 +02:00
.sops.yaml fix: correct sops regex to ya?ml 2026-07-14 16:01:49 +02:00
.yamllint chore: exclude .yml files from lint configs 2026-07-14 16:17:26 +02:00
AGENTS.md chore: add AGENTS.md for opencode agents 2026-02-16 10:06:22 +01:00
ansible.cfg chore: sync linting and config files from common 2026-07-14 11:33:15 +02:00
playbook.yaml chore(playbook): run galaxy install only on first host 2026-08-13 08:49:03 +02:00
readme.md docs: improve readme 2026-10-05 17:29:40 +02:00
renovate.json feat: initial commit 2025-10-22 11:52:59 +02:00

Ansible Role: Jellyfin

Install and configure Jellyfin - a free media system - as a Docker container, with media read from an NFS share.

Requirements

  • A Docker host (the role does not install Docker itself).
  • A group named blackbeard that already exists on the host. The role adds the jellyfin user to it but does not create it.
  • A GPU render device at /dev/dri (passed through to the container for hardware transcoding).
  • Access to the NFS server 192.168.10.41 exporting /srv/nfs/media (NFS 4.2). The address and export are hardcoded in tasks/jellyfin.yaml.

Dependencies

The playbook (playbook.yaml) runs these roles, in order, before jellyfin:

  • docker
  • traefik

Variables

The role has no defaults/main.yaml. The variables below are used by the tasks and must come from the inventory.

Variable Required Default Description
jellyfin_puid Yes UID of the jellyfin user, also used as container PUID
blackbeard_guid Yes GID of the blackbeard group, used as container PGID
timezone Yes Timezone passed to the container as TZ

Example

jellyfin_puid: "1001"
blackbeard_guid: "1000"
timezone: "Europe/Amsterdam"

What the role does

  • Creates the jellyfin user (shell /bin/bash, UID jellyfin_puid, group blackbeard).
  • Creates /mnt/jellyfin/config (owner jellyfin, group blackbeard, mode 0775).
  • Creates a local Docker volume media of type nfs4 pointing at :/srv/nfs/media on 192.168.10.41.
  • Runs the jellyfin container from cr.simoncor.net/lscr/linuxserver/jellyfin:12.0ubu2604-ls48 on the host network (so Jellyfin listens on its default port 8096), always pulled, restart policy unless-stopped, json-file logs (max 5m x 3).
  • Mounts /mnt/jellyfin/config on /config, the media volume on /mnt/media/ and passes through /dev/dri.
  • Cleans up Docker afterwards (tasks/cleanup.yaml): docker_prune and docker system prune --all --force --volumes, which removes all unused images, networks and volumes on the host.

Usage

Run playbook.yaml through Semaphore. It first runs ansible-galaxy install -f -r roles/requirements.yml on the controller (works around a Semaphore bug), then the docker, traefik and jellyfin roles on all hosts.