/
/
/
Ansible role that provisions my storage server.
1# templates/jellyfin.env.j2
2# Jellyfin Media Server Environment Configuration
3# Generated by Ansible - DO NOT EDIT MANUALLY
4
5# User and Group Configuration
6PUID={{ storage_uid }}
7PGID={{ storage_gid }}
8TZ={{ storage_timezone }}
9UMASK_SET=022
10
11# Jellyfin Configuration
12JELLYFIN_PublishedServerUrl=http://{{ ansible_default_ipv4.address }}:{{ jellyfin_host_port }}
13
14# CPU Transcoding Optimization
15FFMPEG_THREADS=4
16FFMPEG_EXTRA_ARGS=-threads 4 -preset fast
17JELLYFIN_FFMPEG_OPTIMIZATIONS=1
18
19# Admin Configuration (if vault variables are set)
20{% if jellyfin_admin_username is defined and jellyfin_admin_username != "" %}
21JELLYFIN_ADMIN_USERNAME={{ jellyfin_admin_username }}
22{% endif %}
23{% if jellyfin_admin_password is defined and jellyfin_admin_password != "" %}
24JELLYFIN_ADMIN_PASSWORD={{ jellyfin_admin_password }}
25{% endif %}
26
27# Memory and Performance Settings
28JELLYFIN_MEM_LIMIT={{ jellyfin_memory_limit }}
29JELLYFIN_CPU_LIMIT={{ jellyfin_cpu_limit }}
30
31# Media Directory
32MEDIA_DIR={{ jellyfin_media_dir }}
33
34# Cache and Config Paths
35CONFIG_DIR={{ jellyfin_config_dir }}
36CACHE_DIR={{ jellyfin_cache_dir }}
37
38{% if jellyfin_hwaccel_enabled and jellyfin_gpu_type == 'intel' and jellyfin_libva_driver_name %}
39# Force Intel VAAPI driver (modern Intel: iHD)
40LIBVA_DRIVER_NAME={{ jellyfin_libva_driver_name }}
41{% endif %}
42
43