/
/
/
Ansible role that provisions my storage server.
1---
2# Storage Services Role Defaults
3# Comprehensive media automation and backup configuration
4
5# ==============================================================================
6# GENERAL SETTINGS
7# ==============================================================================
8storage_enabled: true
9storage_docker_dir: "/docker"
10storage_base_path: "/mnt/rstorage"
11storage_user: "{{ ansible_user }}"
12storage_group: "users"
13storage_uid: 1000
14storage_gid: 100
15
16# Timezone configuration
17storage_timezone: "{{ system_timezone }}"
18
19# Docker network for storage services
20storage_docker_network: "storage-network"
21storage_network_subnet: "172.21.0.0/16"
22
23# Arr Stack Docker Network (isolated from storage)
24arr_docker_network: "arr-network"
25arr_network_subnet: "172.22.0.0/16"
26
27# Configuration directories (used by prerequisites for directory creation)
28storage_config_directories:
29 - "{{ storage_docker_dir }}"
30 - "{{ jellyfin_data_dir }}"
31 - "{{ jellyfin_config_dir }}"
32 - "{{ jellyfin_cache_dir }}"
33 - "{{ arr_config_dir }}"
34 - "{{ sonarr_config_dir }}"
35 - "{{ radarr_config_dir }}"
36 - "{{ prowlarr_config_dir }}"
37 - "{{ lazylibrarian_config_dir }}"
38 - "{{ bazarr_config_dir }}"
39 - "{{ jellyseer_config_dir }}"
40 - "{{ flaresolverr_config_dir }}"
41 - "{{ qbittorrent_config_dir }}"
42 - "{{ gluetun_config_dir }}"
43 - "{{ lidarr_config_dir }}"
44 - "{{ music_assistant_config_dir }}"
45 - "{{ music_assistant_data_dir }}"
46 - "{{ calibre_config_dir }}"
47 - "{{ calibre_server_config_dir }}"
48 - "{{ calibre_web_config_dir }}"
49 - "{{ restic_backup_config_dir }}"
50
51# ==============================================================================
52# SERVICE CONFIGURATIONS
53# ==============================================================================
54
55# Jellyfin Media Server
56jellyfin_enabled: true
57jellyfin_port: 8096
58jellyfin_host_port: 8096
59jellyfin_data_dir: "{{ storage_docker_dir }}/jellyfin"
60jellyfin_config_dir: "{{ jellyfin_data_dir }}/config"
61jellyfin_cache_dir: "{{ jellyfin_data_dir }}/cache"
62jellyfin_media_dir: "{{ storage_base_path }}/media"
63
64jellyfin_image: "jellyfin/jellyfin"
65jellyfin_version: "latest"
66
67# --- Hardware acceleration (Intel iGPU / VAAPI)
68jellyfin_hwaccel_enabled: true
69jellyfin_dri_device: "/dev/dri"
70jellyfin_render_group_gid: "109" # render group on host
71jellyfin_video_group_gid: "44" # video group on host
72
73# Arr Stack Configuration
74arr_stack_enabled: true
75arr_vpn_enabled: true
76arr_downloads_dir: "{{ storage_base_path }}/downloads"
77arr_config_dir: "{{ storage_docker_dir }}/media-automation"
78
79# Sonarr (TV Shows)
80sonarr_enabled: true
81sonarr_port: 8989
82sonarr_host_port: 8989
83sonarr_config_dir: "{{ arr_config_dir }}/sonarr"
84sonarr_tv_dir: "{{ storage_base_path }}/media/shows"
85
86# Radarr (Movies)
87radarr_enabled: true
88radarr_port: 7878
89radarr_host_port: 7878
90radarr_config_dir: "{{ arr_config_dir }}/radarr"
91radarr_movies_dir: "{{ storage_base_path }}/media/movies"
92
93# Prowlarr (Indexers)
94prowlarr_enabled: true
95prowlarr_port: 9696
96prowlarr_host_port: 9696
97prowlarr_config_dir: "{{ arr_config_dir }}/prowlarr"
98
99# LazyLibrarian (Books) - Replaced Readarr
100# Uses a custom Dockerfile that adds Calibre for ebook conversion
101lazylibrarian_enabled: true
102lazylibrarian_port: 5299
103lazylibrarian_host_port: 5299
104lazylibrarian_config_dir: "{{ arr_config_dir }}/lazy-librarian"
105lazylibrarian_books_dir: "{{ storage_base_path }}/media/books"
106lazylibrarian_custom_build: true
107lazylibrarian_custom_image: "my/lazylibrarian-with-calibre:latest"
108
109# Jellyseer (Media Requests)
110jellyseer_enabled: true
111jellyseer_port: 5055
112jellyseer_host_port: 5055
113jellyseer_config_dir: "{{ arr_config_dir }}/jellyseer"
114
115# Bazarr (Subtitles)
116bazarr_enabled: true
117bazarr_port: 6767
118bazarr_host_port: 6767
119bazarr_config_dir: "{{ arr_config_dir }}/bazarr"
120bazarr_movies_dir: "{{ storage_base_path }}/media/movies"
121bazarr_shows_dir: "{{ storage_base_path }}/media/shows"
122
123# Flaresolverr (Cloudflare bypass)
124flaresolverr_enabled: true
125flaresolverr_port: 8191
126flaresolverr_host_port: 8191
127flaresolverr_config_dir: "{{ arr_config_dir }}/flaresolverr"
128
129# qBittorrent (Download Client)
130qbittorrent_enabled: true
131qbittorrent_image: "lscr.io/linuxserver/qbittorrent"
132qbittorrent_version: "latest"
133qbittorrent_port: 8080
134qbittorrent_host_port: 8085
135qbittorrent_config_dir: "{{ arr_config_dir }}/qbittorrent"
136qbittorrent_downloads_dir: "{{ arr_downloads_dir }}"
137
138# Lidarr (Music)
139lidarr_enabled: true
140lidarr_port: 8686
141lidarr_host_port: 8686
142lidarr_config_dir: "{{ arr_config_dir }}/lidarr"
143lidarr_music_dir: "{{ storage_base_path }}/media/music"
144
145# Gluetun VPN for Arr Stack
146gluetun_enabled: "{{ arr_vpn_enabled }}"
147gluetun_config_dir: "{{ arr_config_dir }}/gluetun"
148
149# VPN Provider Settings (from vault)
150vpn_service_provider: "{{ vault_storage.vpn_service_provider | default('') }}"
151vpn_server_countries: "Netherlands,Switzerland"
152vpn_server_regions: "Europe"
153
154# Firewall - allow arr services to reach LAN (Jellyfin, Calibre, etc.)
155firewall_outbound_subnets: "192.168.34.0/24"
156
157# Calibre Stack Configuration
158calibre_enabled: true
159calibre_config_dir: "{{ storage_docker_dir }}/calibre"
160calibre_library_dir: "{{ storage_base_path }}/media/books"
161
162# Calibre Server
163calibre_server_enabled: true
164calibre_desktop_gui_port: 8080
165calibre_desktop_gui_host_port: 6080
166calibre_https_desktop_gui_port: 8181
167calibre_https_desktop_gui_host_port: 6181
168calibre_server_port: 8081
169calibre_server_host_port: 6081
170calibre_server_config_dir: "{{ calibre_config_dir }}/server"
171
172# Calibre-Web
173calibre_web_enabled: true
174calibre_web_port: 8083
175calibre_web_host_port: 6083
176calibre_web_config_dir: "{{ calibre_config_dir }}/web"
177
178# ==============================================================================
179# MUSIC ASSISTANT CONFIGURATION
180# ==============================================================================
181music_assistant_enabled: true
182music_assistant_config_dir: "{{ storage_docker_dir }}/music-assistant"
183music_assistant_data_dir: "{{ music_assistant_config_dir }}/data"
184music_assistant_music_dir: "{{ storage_base_path }}/media/music"
185music_assistant_image: "rakys.xyz/docker/music-assistant-server"
186music_assistant_version: "dev-lidarr-plugin"
187music_assistant_log_level: "info"
188
189# ==============================================================================
190# RESTIC BACKUP SERVER CONFIGURATION
191# ==============================================================================
192restic_backup_server_enabled: true
193restic_backup_port: 8000
194restic_backup_host_port: 8000
195restic_backup_config_dir: "{{ storage_docker_dir }}/restic-server"
196restic_backup_data_dir: "{{ storage_base_path }}/backups"
197
198# Restic server authentication (from vault)
199restic_backup_username: "{{ vault_storage.restic_backup_username | default('') }}"
200restic_backup_password: "{{ vault_storage.restic_backup_password | default('') }}"
201
202# ==============================================================================
203# VOLUME MOUNTS AND PATHS
204# ==============================================================================
205
206# Common media directories (only what services actually use)
207media_directories:
208 - "{{ storage_base_path }}/media"
209 - "{{ storage_base_path }}/media/movies"
210 - "{{ storage_base_path }}/media/shows"
211 - "{{ storage_base_path }}/media/books"
212 - "{{ storage_base_path }}/media/music"
213 - "{{ storage_base_path }}/downloads"
214 - "{{ storage_base_path }}/backups"
215
216# Docker configuration directories
217docker_config_directories:
218 - "{{ storage_docker_dir }}"
219 - "{{ jellyfin_data_dir }}"
220 - "{{ jellyfin_config_dir }}"
221 - "{{ jellyfin_cache_dir }}"
222 - "{{ arr_config_dir }}"
223 - "{{ sonarr_config_dir }}"
224 - "{{ radarr_config_dir }}"
225 - "{{ prowlarr_config_dir }}"
226 - "{{ lazylibrarian_config_dir }}"
227 - "{{ bazarr_config_dir }}"
228 - "{{ jellyseer_config_dir }}"
229 - "{{ flaresolverr_config_dir }}"
230 - "{{ qbittorrent_config_dir }}"
231 - "{{ gluetun_config_dir }}"
232 - "{{ lidarr_config_dir }}"
233 - "{{ music_assistant_config_dir }}"
234 - "{{ music_assistant_data_dir }}"
235 - "{{ calibre_config_dir }}"
236 - "{{ calibre_server_config_dir }}"
237 - "{{ calibre_web_config_dir }}"
238 - "{{ restic_backup_config_dir }}"
239
240# ==============================================================================
241# SECURITY AND ACCESS SETTINGS
242# ==============================================================================
243
244# User credentials (from vault)
245jellyfin_admin_username: "{{ vault_storage.jellyfin_admin_username | default('') }}"
246jellyfin_admin_password: "{{ vault_storage.jellyfin_admin_password | default('') }}"
247calibre_web_admin_username: "{{ vault_storage.calibre_web_admin_username | default('') }}"
248calibre_web_admin_password: "{{ vault_storage.calibre_web_admin_password | default('') }}"
249
250# ==============================================================================
251# PERFORMANCE TUNING
252# ==============================================================================
253
254# Docker resource limits (can be overridden per service)
255default_memory_limit: "2g"
256default_cpu_limit: "2"
257
258# Service-specific resource limits (following runner pattern)
259jellyfin_memory_limit: "4g"
260jellyfin_cpu_limit: "4"
261arr_stack_memory_limit: "1g"
262arr_stack_cpu_limit: "1"
263calibre_stack_memory_limit: "1g"
264calibre_stack_cpu_limit: "1"
265restic_server_memory_limit: "512m"
266restic_server_cpu_limit: "0.5"
267
268# ==============================================================================
269# MONITORING AND HEALTH CHECKS
270# ==============================================================================
271health_check_enabled: true
272health_check_interval: "30s"
273health_check_timeout: "10s"
274health_check_retries: 3
275health_check_start_period: "60s"
276
277# ==============================================================================
278# BACKUP CONFIGURATION
279# ==============================================================================
280backup_jellyfin_config: true
281backup_arr_configs: true
282backup_calibre_library: true
283backup_restic_config: true
284backup_retention_days: 30
285backup_schedule: "0 3 * * *" # 3 AM daily
286
287# ==============================================================================
288# SERVICE HEALTH ENDPOINTS
289# ==============================================================================
290service_endpoints:
291 jellyfin: "http://localhost:{{ jellyfin_port }}/health"
292 sonarr: "http://localhost:{{ sonarr_port }}"
293 radarr: "http://localhost:{{ radarr_port }}"
294 prowlarr: "http://localhost:{{ prowlarr_port }}"
295 lazylibrarian: "http://localhost:{{ lazylibrarian_port }}"
296 lidarr: "http://localhost:{{ lidarr_port }}"
297 jellyseer: "http://localhost:{{ jellyseer_port }}"
298 bazarr: "http://localhost:{{ bazarr_port }}"
299 flaresolverr: "http://localhost:{{ flaresolverr_port }}"
300 qbittorrent: "http://localhost:{{ qbittorrent_port }}"
301 calibre_server: "http://localhost:{{ calibre_server_port }}"
302 calibre_web: "http://localhost:{{ calibre_web_port }}"
303 music_assistant: "http://localhost:8095"
304 restic_server: "http://localhost:{{ restic_backup_port }}"
305