/
/
/
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 - "{{ navidrome_config_dir }}"
46 - "{{ navidrome_data_dir }}"
47 - "{{ calibre_config_dir }}"
48 - "{{ calibre_server_config_dir }}"
49 - "{{ calibre_web_config_dir }}"
50 - "{{ restic_backup_config_dir }}"
51 - "{{ nextcloud_config_dir }}"
52 - "{{ nextcloud_mariadb_config_dir }}"
53 - "{{ nextcloud_redis_config_dir }}"
54 - "{{ nextcloud_elasticsearch_config_dir }}"
55 - "{{ nextcloud_collabora_config_dir }}"
56
57# ==============================================================================
58# SERVICE CONFIGURATIONS
59# ==============================================================================
60
61# Jellyfin Media Server
62jellyfin_enabled: true
63jellyfin_port: 8096
64jellyfin_host_port: 8096
65jellyfin_data_dir: "{{ storage_docker_dir }}/jellyfin"
66jellyfin_config_dir: "{{ jellyfin_data_dir }}/config"
67jellyfin_cache_dir: "{{ jellyfin_data_dir }}/cache"
68jellyfin_media_dir: "{{ storage_base_path }}/media"
69
70# --- Hardware acceleration (Intel iGPU / VAAPI)
71jellyfin_hwaccel_enabled: true
72jellyfin_dri_device: "/dev/dri"
73jellyfin_render_group_gid: "109" # render group on host
74jellyfin_video_group_gid: "44" # video group on host
75
76# Arr Stack Configuration
77arr_stack_enabled: true
78arr_vpn_enabled: true
79arr_downloads_dir: "{{ storage_base_path }}/downloads"
80arr_config_dir: "{{ storage_docker_dir }}/media-automation"
81
82# Sonarr (TV Shows)
83sonarr_enabled: true
84sonarr_port: 8989
85sonarr_host_port: 8989
86sonarr_config_dir: "{{ arr_config_dir }}/sonarr"
87sonarr_tv_dir: "{{ storage_base_path }}/media/shows"
88
89# Radarr (Movies)
90radarr_enabled: true
91radarr_port: 7878
92radarr_host_port: 7878
93radarr_config_dir: "{{ arr_config_dir }}/radarr"
94radarr_movies_dir: "{{ storage_base_path }}/media/movies"
95
96# Prowlarr (Indexers)
97prowlarr_enabled: true
98prowlarr_port: 9696
99prowlarr_host_port: 9696
100prowlarr_config_dir: "{{ arr_config_dir }}/prowlarr"
101
102# LazyLibrarian (Books) - Replaced Readarr
103# Uses a custom Dockerfile that adds Calibre for ebook conversion
104lazylibrarian_enabled: true
105lazylibrarian_port: 5299
106lazylibrarian_host_port: 5299
107lazylibrarian_config_dir: "{{ arr_config_dir }}/lazy-librarian"
108lazylibrarian_books_dir: "{{ storage_base_path }}/media/books"
109lazylibrarian_custom_build: true
110lazylibrarian_custom_image: "my/lazylibrarian-with-calibre:latest"
111
112# Jellyseer (Media Requests)
113jellyseer_enabled: true
114jellyseer_port: 5055
115jellyseer_host_port: 5055
116jellyseer_config_dir: "{{ arr_config_dir }}/jellyseer"
117
118# Bazarr (Subtitles)
119bazarr_enabled: true
120bazarr_port: 6767
121bazarr_host_port: 6767
122bazarr_config_dir: "{{ arr_config_dir }}/bazarr"
123bazarr_movies_dir: "{{ storage_base_path }}/media/movies"
124bazarr_shows_dir: "{{ storage_base_path }}/media/shows"
125
126# Flaresolverr (Cloudflare bypass)
127flaresolverr_enabled: true
128flaresolverr_port: 8191
129flaresolverr_host_port: 8191
130flaresolverr_config_dir: "{{ arr_config_dir }}/flaresolverr"
131
132# qBittorrent (Download Client)
133qbittorrent_enabled: true
134qbittorrent_port: 8080
135qbittorrent_host_port: 8085
136qbittorrent_config_dir: "{{ arr_config_dir }}/qbittorrent"
137qbittorrent_downloads_dir: "{{ arr_downloads_dir }}"
138
139# Lidarr (Music)
140lidarr_enabled: true
141lidarr_port: 8686
142lidarr_host_port: 8686
143lidarr_config_dir: "{{ arr_config_dir }}/lidarr"
144lidarr_music_dir: "{{ storage_base_path }}/media/music"
145
146# Cleanuparr (Automated download cleanup for Sonarr/Radarr)
147cleanuparr_enabled: true
148cleanuparr_port: 11011
149cleanuparr_host_port: 11011
150cleanuparr_config_dir: "{{ arr_config_dir }}/cleanuparr"
151
152# Gluetun VPN for Arr Stack
153gluetun_enabled: "{{ arr_vpn_enabled }}"
154gluetun_config_dir: "{{ arr_config_dir }}/gluetun"
155
156# VPN Provider Settings (from vault)
157vpn_service_provider: "{{ vault_storage.vpn_service_provider | default('') }}"
158vpn_server_countries: "Netherlands,Switzerland"
159vpn_server_regions: "Europe"
160
161# Firewall - allow arr services to reach LAN (Jellyfin, Calibre, etc.)
162firewall_outbound_subnets: "192.168.34.0/24"
163
164# Calibre Stack Configuration
165calibre_enabled: true
166calibre_config_dir: "{{ storage_docker_dir }}/calibre"
167calibre_library_dir: "{{ storage_base_path }}/media/books"
168
169# Calibre Server
170calibre_server_enabled: true
171calibre_desktop_gui_port: 8080
172calibre_desktop_gui_host_port: 6080
173calibre_https_desktop_gui_port: 8181
174calibre_https_desktop_gui_host_port: 6181
175calibre_server_port: 8081
176calibre_server_host_port: 6081
177calibre_server_config_dir: "{{ calibre_config_dir }}/server"
178
179# Calibre-Web
180calibre_web_enabled: true
181calibre_web_port: 8083
182calibre_web_host_port: 6083
183calibre_web_config_dir: "{{ calibre_config_dir }}/web"
184
185# ==============================================================================
186# NEXTCLOUD CONFIGURATION
187# ==============================================================================
188nextcloud_enabled: false
189nextcloud_port: 80
190nextcloud_host_port: 8443
191nextcloud_config_dir: "{{ storage_docker_dir }}/nextcloud"
192nextcloud_data_dir: "{{ storage_base_path }}/nextcloud"
193nextcloud_mariadb_config_dir: "{{ nextcloud_config_dir }}/db"
194nextcloud_redis_config_dir: "{{ nextcloud_config_dir }}/redis"
195nextcloud_elasticsearch_config_dir: "{{ nextcloud_config_dir }}/elasticsearch"
196nextcloud_collabora_config_dir: "{{ nextcloud_config_dir }}/collabora"
197
198# Nextcloud database (from vault)
199nextcloud_db_name: "nextcloud"
200nextcloud_db_user: "{{ vault_storage.nextcloud_db_user | default('') }}"
201nextcloud_db_password: "{{ vault_storage.nextcloud_db_password | default('') }}"
202nextcloud_db_root_password: "{{ vault_storage.nextcloud_db_root_password | default('') }}"
203
204# Nextcloud admin (from vault)
205nextcloud_admin_user: "{{ vault_storage.nextcloud_admin_user | default('') }}"
206nextcloud_admin_password: "{{ vault_storage.nextcloud_admin_password | default('') }}"
207
208# Nextcloud trusted domains (space-separated in the container env)
209nextcloud_trusted_domains:
210 - "localhost"
211 - "{{ ansible_default_ipv4.address | default('127.0.0.1') }}"
212 - "storage.home"
213 - "nextcloud.home"
214 - "nextcloud"
215
216# Collabora Online (document editing)
217nextcloud_collabora_domain: "nextcloud\\.home"
218nextcloud_collabora_extra_params: "--o:ssl.enable=false --o:ssl.termination=false"
219nextcloud_collabora_port: 9980
220nextcloud_collabora_host_port: 9980
221
222# Public URL for Collabora (browser must reach this to load the editor)
223nextcloud_collabora_public_url: "http://nextcloud.home:{{ nextcloud_collabora_host_port }}"
224
225# Elasticsearch (full-text search via fulltextsearch app)
226nextcloud_elasticsearch_password: "{{ vault_storage.nextcloud_elasticsearch_password | default('changeme') }}"
227
228# Nextcloud PHP tuning
229nextcloud_php_memory_limit: "512M"
230nextcloud_php_upload_limit: "16G"
231
232# Nextcloud resource limits
233nextcloud_memory_limit: "2g"
234nextcloud_cpu_limit: "2"
235nextcloud_db_memory_limit: "1g"
236nextcloud_db_cpu_limit: "1"
237nextcloud_redis_memory_limit: "256m"
238nextcloud_redis_cpu_limit: "0.5"
239nextcloud_collabora_memory_limit: "2g"
240nextcloud_collabora_cpu_limit: "2"
241nextcloud_elasticsearch_memory_limit: "2g"
242nextcloud_elasticsearch_cpu_limit: "1"
243nextcloud_imaginary_memory_limit: "1g"
244nextcloud_imaginary_cpu_limit: "1"
245
246# ==============================================================================
247# NAVIDROME CONFIGURATION
248# ==============================================================================
249navidrome_enabled: true
250navidrome_port: 4533
251navidrome_host_port: 4533
252navidrome_config_dir: "{{ storage_docker_dir }}/navidrome"
253navidrome_data_dir: "{{ navidrome_config_dir }}/data"
254navidrome_music_dir: "{{ storage_base_path }}/media/music"
255
256# ==============================================================================
257# RESTIC BACKUP SERVER CONFIGURATION
258# ==============================================================================
259restic_backup_server_enabled: true
260restic_backup_port: 8000
261restic_backup_host_port: 8000
262restic_backup_config_dir: "{{ storage_docker_dir }}/restic-server"
263restic_backup_data_dir: "{{ storage_base_path }}/backups"
264
265# Restic server authentication (from vault)
266restic_backup_username: "{{ vault_storage.restic_backup_username | default('') }}"
267restic_backup_password: "{{ vault_storage.restic_backup_password | default('') }}"
268
269# ==============================================================================
270# VOLUME MOUNTS AND PATHS
271# ==============================================================================
272
273# Common media directories (only what services actually use)
274media_directories:
275 - "{{ storage_base_path }}/media"
276 - "{{ storage_base_path }}/media/movies"
277 - "{{ storage_base_path }}/media/shows"
278 - "{{ storage_base_path }}/media/books"
279 - "{{ storage_base_path }}/media/music"
280 - "{{ storage_base_path }}/downloads"
281 - "{{ storage_base_path }}/backups"
282 - "{{ nextcloud_data_dir }}"
283
284# Docker configuration directories
285docker_config_directories:
286 - "{{ storage_docker_dir }}"
287 - "{{ jellyfin_data_dir }}"
288 - "{{ jellyfin_config_dir }}"
289 - "{{ jellyfin_cache_dir }}"
290 - "{{ arr_config_dir }}"
291 - "{{ sonarr_config_dir }}"
292 - "{{ radarr_config_dir }}"
293 - "{{ prowlarr_config_dir }}"
294 - "{{ lazylibrarian_config_dir }}"
295 - "{{ bazarr_config_dir }}"
296 - "{{ jellyseer_config_dir }}"
297 - "{{ flaresolverr_config_dir }}"
298 - "{{ qbittorrent_config_dir }}"
299 - "{{ gluetun_config_dir }}"
300 - "{{ lidarr_config_dir }}"
301 - "{{ cleanuparr_config_dir }}"
302 - "{{ navidrome_config_dir }}"
303 - "{{ navidrome_data_dir }}"
304 - "{{ calibre_config_dir }}"
305 - "{{ calibre_server_config_dir }}"
306 - "{{ calibre_web_config_dir }}"
307 - "{{ restic_backup_config_dir }}"
308 - "{{ nextcloud_config_dir }}"
309 - "{{ nextcloud_mariadb_config_dir }}"
310 - "{{ nextcloud_redis_config_dir }}"
311 - "{{ nextcloud_elasticsearch_config_dir }}"
312 - "{{ nextcloud_collabora_config_dir }}"
313
314# ==============================================================================
315# SECURITY AND ACCESS SETTINGS
316# ==============================================================================
317
318# User credentials (from vault)
319jellyfin_admin_username: "{{ vault_storage.jellyfin_admin_username | default('') }}"
320jellyfin_admin_password: "{{ vault_storage.jellyfin_admin_password | default('') }}"
321calibre_web_admin_username: "{{ vault_storage.calibre_web_admin_username | default('') }}"
322calibre_web_admin_password: "{{ vault_storage.calibre_web_admin_password | default('') }}"
323
324# ==============================================================================
325# PERFORMANCE TUNING
326# ==============================================================================
327
328# Docker resource limits (can be overridden per service)
329default_memory_limit: "2g"
330default_cpu_limit: "2"
331
332# Service-specific resource limits (following runner pattern)
333jellyfin_memory_limit: "4g"
334jellyfin_cpu_limit: "4"
335arr_stack_memory_limit: "1g"
336arr_stack_cpu_limit: "1"
337calibre_stack_memory_limit: "1g"
338calibre_stack_cpu_limit: "1"
339restic_server_memory_limit: "512m"
340restic_server_cpu_limit: "0.5"
341
342# ==============================================================================
343# MONITORING AND HEALTH CHECKS
344# ==============================================================================
345health_check_enabled: true
346health_check_interval: "30s"
347health_check_timeout: "10s"
348health_check_retries: 3
349health_check_start_period: "60s"
350
351# ==============================================================================
352# BACKUP CONFIGURATION
353# ==============================================================================
354backup_jellyfin_config: true
355backup_arr_configs: true
356backup_calibre_library: true
357backup_restic_config: true
358backup_retention_days: 30
359backup_schedule: "0 3 * * *" # 3 AM daily
360
361# ==============================================================================
362# SERVICE HEALTH ENDPOINTS
363# ==============================================================================
364service_endpoints:
365 jellyfin: "http://localhost:{{ jellyfin_port }}/health"
366 sonarr: "http://localhost:{{ sonarr_port }}"
367 radarr: "http://localhost:{{ radarr_port }}"
368 prowlarr: "http://localhost:{{ prowlarr_port }}"
369 lazylibrarian: "http://localhost:{{ lazylibrarian_port }}"
370 lidarr: "http://localhost:{{ lidarr_port }}"
371 jellyseer: "http://localhost:{{ jellyseer_port }}"
372 bazarr: "http://localhost:{{ bazarr_port }}"
373 flaresolverr: "http://localhost:{{ flaresolverr_port }}"
374 qbittorrent: "http://localhost:{{ qbittorrent_port }}"
375 calibre_server: "http://localhost:{{ calibre_server_port }}"
376 calibre_web: "http://localhost:{{ calibre_web_port }}"
377 cleanuparr: "http://localhost:{{ cleanuparr_port }}/health"
378 navidrome: "http://localhost:{{ navidrome_port }}"
379 restic_server: "http://localhost:{{ restic_backup_port }}"
380 nextcloud: "http://localhost:{{ nextcloud_port }}/status.php"
381