/
/
/
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 - "{{ cleanuparr_config_dir }}"
45 - "{{ music_assistant_config_dir }}"
46 - "{{ music_assistant_data_dir }}"
47 - "{{ navidrome_config_dir }}"
48 - "{{ navidrome_data_dir }}"
49 - "{{ calibre_config_dir }}"
50 - "{{ calibre_server_config_dir }}"
51 - "{{ calibre_web_config_dir }}"
52 - "{{ restic_backup_config_dir }}"
53
54# ==============================================================================
55# SERVICE CONFIGURATIONS
56# ==============================================================================
57
58# Jellyfin Media Server
59jellyfin_enabled: true
60jellyfin_port: 8096
61jellyfin_host_port: 8096
62jellyfin_data_dir: "{{ storage_docker_dir }}/jellyfin"
63jellyfin_config_dir: "{{ jellyfin_data_dir }}/config"
64jellyfin_cache_dir: "{{ jellyfin_data_dir }}/cache"
65jellyfin_media_dir: "{{ storage_base_path }}/media"
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_port: 8080
132qbittorrent_host_port: 8085
133qbittorrent_config_dir: "{{ arr_config_dir }}/qbittorrent"
134qbittorrent_downloads_dir: "{{ arr_downloads_dir }}"
135
136# Lidarr (Music)
137lidarr_enabled: true
138lidarr_port: 8686
139lidarr_host_port: 8686
140lidarr_config_dir: "{{ arr_config_dir }}/lidarr"
141lidarr_music_dir: "{{ storage_base_path }}/media/music"
142
143# Cleanuparr (Automated download cleanup for Sonarr/Radarr)
144cleanuparr_enabled: true
145cleanuparr_port: 11011
146cleanuparr_host_port: 11011
147cleanuparr_config_dir: "{{ arr_config_dir }}/cleanuparr"
148
149# Gluetun VPN for Arr Stack
150gluetun_enabled: "{{ arr_vpn_enabled }}"
151gluetun_config_dir: "{{ arr_config_dir }}/gluetun"
152
153# VPN Provider Settings (from vault)
154vpn_service_provider: "{{ vault_storage.vpn_service_provider | default('') }}"
155vpn_server_countries: "Netherlands,Switzerland"
156vpn_server_regions: "Europe"
157
158# Firewall - allow arr services to reach LAN (Jellyfin, Calibre, etc.)
159firewall_outbound_subnets: "192.168.34.0/24"
160
161# Calibre Stack Configuration
162calibre_enabled: true
163calibre_config_dir: "{{ storage_docker_dir }}/calibre"
164calibre_library_dir: "{{ storage_base_path }}/media/books"
165
166# Calibre Server
167calibre_server_enabled: true
168calibre_desktop_gui_port: 8080
169calibre_desktop_gui_host_port: 6080
170calibre_https_desktop_gui_port: 8181
171calibre_https_desktop_gui_host_port: 6181
172calibre_server_port: 8081
173calibre_server_host_port: 6081
174calibre_server_config_dir: "{{ calibre_config_dir }}/server"
175
176# Calibre-Web
177calibre_web_enabled: true
178calibre_web_port: 8083
179calibre_web_host_port: 6083
180calibre_web_config_dir: "{{ calibre_config_dir }}/web"
181
182# ==============================================================================
183# MUSIC ASSISTANT CONFIGURATION
184# ==============================================================================
185music_assistant_enabled: true
186music_assistant_config_dir: "{{ storage_docker_dir }}/music-assistant"
187music_assistant_data_dir: "{{ music_assistant_config_dir }}/data"
188music_assistant_music_dir: "{{ storage_base_path }}/media/music"
189music_assistant_image: "rakys.xyz/docker/music-assistant-server"
190music_assistant_version: "dev-lidarr-plugin"
191music_assistant_log_level: "info"
192
193# ==============================================================================
194# NAVIDROME CONFIGURATION
195# ==============================================================================
196navidrome_enabled: true
197navidrome_port: 4533
198navidrome_host_port: 4533
199navidrome_config_dir: "{{ storage_docker_dir }}/navidrome"
200navidrome_data_dir: "{{ navidrome_config_dir }}/data"
201navidrome_music_dir: "{{ storage_base_path }}/media/music"
202
203# ==============================================================================
204# RESTIC BACKUP SERVER CONFIGURATION
205# ==============================================================================
206restic_backup_server_enabled: true
207restic_backup_port: 8000
208restic_backup_host_port: 8000
209restic_backup_config_dir: "{{ storage_docker_dir }}/restic-server"
210restic_backup_data_dir: "{{ storage_base_path }}/backups"
211
212# Restic server authentication (from vault)
213restic_backup_username: "{{ vault_storage.restic_backup_username | default('') }}"
214restic_backup_password: "{{ vault_storage.restic_backup_password | default('') }}"
215
216# ==============================================================================
217# VOLUME MOUNTS AND PATHS
218# ==============================================================================
219
220# Common media directories (only what services actually use)
221media_directories:
222 - "{{ storage_base_path }}/media"
223 - "{{ storage_base_path }}/media/movies"
224 - "{{ storage_base_path }}/media/shows"
225 - "{{ storage_base_path }}/media/books"
226 - "{{ storage_base_path }}/media/music"
227 - "{{ storage_base_path }}/downloads"
228 - "{{ storage_base_path }}/backups"
229
230# Docker configuration directories
231docker_config_directories:
232 - "{{ storage_docker_dir }}"
233 - "{{ jellyfin_data_dir }}"
234 - "{{ jellyfin_config_dir }}"
235 - "{{ jellyfin_cache_dir }}"
236 - "{{ arr_config_dir }}"
237 - "{{ sonarr_config_dir }}"
238 - "{{ radarr_config_dir }}"
239 - "{{ prowlarr_config_dir }}"
240 - "{{ lazylibrarian_config_dir }}"
241 - "{{ bazarr_config_dir }}"
242 - "{{ jellyseer_config_dir }}"
243 - "{{ flaresolverr_config_dir }}"
244 - "{{ qbittorrent_config_dir }}"
245 - "{{ gluetun_config_dir }}"
246 - "{{ lidarr_config_dir }}"
247 - "{{ cleanuparr_config_dir }}"
248 - "{{ music_assistant_config_dir }}"
249 - "{{ music_assistant_data_dir }}"
250 - "{{ navidrome_config_dir }}"
251 - "{{ navidrome_data_dir }}"
252 - "{{ calibre_config_dir }}"
253 - "{{ calibre_server_config_dir }}"
254 - "{{ calibre_web_config_dir }}"
255 - "{{ restic_backup_config_dir }}"
256
257# ==============================================================================
258# SECURITY AND ACCESS SETTINGS
259# ==============================================================================
260
261# User credentials (from vault)
262jellyfin_admin_username: "{{ vault_storage.jellyfin_admin_username | default('') }}"
263jellyfin_admin_password: "{{ vault_storage.jellyfin_admin_password | default('') }}"
264calibre_web_admin_username: "{{ vault_storage.calibre_web_admin_username | default('') }}"
265calibre_web_admin_password: "{{ vault_storage.calibre_web_admin_password | default('') }}"
266
267# ==============================================================================
268# PERFORMANCE TUNING
269# ==============================================================================
270
271# Docker resource limits (can be overridden per service)
272default_memory_limit: "2g"
273default_cpu_limit: "2"
274
275# Service-specific resource limits (following runner pattern)
276jellyfin_memory_limit: "4g"
277jellyfin_cpu_limit: "4"
278arr_stack_memory_limit: "1g"
279arr_stack_cpu_limit: "1"
280calibre_stack_memory_limit: "1g"
281calibre_stack_cpu_limit: "1"
282restic_server_memory_limit: "512m"
283restic_server_cpu_limit: "0.5"
284
285# ==============================================================================
286# MONITORING AND HEALTH CHECKS
287# ==============================================================================
288health_check_enabled: true
289health_check_interval: "30s"
290health_check_timeout: "10s"
291health_check_retries: 3
292health_check_start_period: "60s"
293
294# ==============================================================================
295# BACKUP CONFIGURATION
296# ==============================================================================
297backup_jellyfin_config: true
298backup_arr_configs: true
299backup_calibre_library: true
300backup_restic_config: true
301backup_retention_days: 30
302backup_schedule: "0 3 * * *" # 3 AM daily
303
304# ==============================================================================
305# SERVICE HEALTH ENDPOINTS
306# ==============================================================================
307service_endpoints:
308 jellyfin: "http://localhost:{{ jellyfin_port }}/health"
309 sonarr: "http://localhost:{{ sonarr_port }}"
310 radarr: "http://localhost:{{ radarr_port }}"
311 prowlarr: "http://localhost:{{ prowlarr_port }}"
312 lazylibrarian: "http://localhost:{{ lazylibrarian_port }}"
313 lidarr: "http://localhost:{{ lidarr_port }}"
314 jellyseer: "http://localhost:{{ jellyseer_port }}"
315 bazarr: "http://localhost:{{ bazarr_port }}"
316 flaresolverr: "http://localhost:{{ flaresolverr_port }}"
317 qbittorrent: "http://localhost:{{ qbittorrent_port }}"
318 calibre_server: "http://localhost:{{ calibre_server_port }}"
319 calibre_web: "http://localhost:{{ calibre_web_port }}"
320 cleanuparr: "http://localhost:{{ cleanuparr_port }}/health"
321 music_assistant: "http://localhost:8095"
322 navidrome: "http://localhost:{{ navidrome_port }}"
323 restic_server: "http://localhost:{{ restic_backup_port }}"
324