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