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