/
/
/
Ansible role that deployes services on my runner machine
1---
2# Runner Services Role Defaults
3# Multi-service container deployment with NFS integration
4
5# ==============================================================================
6# GENERAL SETTINGS
7# ==============================================================================
8runner_enabled: true
9# Legacy variables - no longer used with consolidated structure
10# runner_docker_dir: "/docker/runner" # Now each service uses /docker/[service]
11# runner_data_dir: "/docker/runner-data" # Now consolidated into each service directory
12runner_nfs_mount_dir: "/mnt/docker"
13runner_snapshot_dir: "{{ runner_nfs_mount_dir }}/frigate/snapshots"
14runner_user: "{{ ansible_user }}"
15runner_group: "users"
16runner_uid: 1000
17runner_gid: 1000
18
19# Timezone configuration
20runner_timezone: "{{ system_timezone }}"
21
22# Docker network for runner services
23runner_docker_network: "runner-network"
24runner_network_subnet: "172.20.0.0/16"
25
26# NFS Configuration
27runner_nfs_enabled: true
28runner_nas_host: "{{ vault_storage.nas_host | default('storage.home') }}"
29runner_nfs_options: "nfsvers=4.1,proto=tcp,hard,timeo=600,retrans=2,rsize=16777216,wsize=16777216,nconnect=8,noatime,_netdev"
30
31# ==============================================================================
32# NFS MOUNT CONFIGURATION
33# ==============================================================================
34runner_nfs_mounts:
35 - name: "frigate"
36 local_path: "{{ runner_nfs_mount_dir }}/frigate"
37 nfs_path: "/mnt/rstorage/cctv-data"
38 host: "{{ runner_nas_host }}"
39 options: "{{ runner_nfs_options }}"
40
41 - name: "immich"
42 local_path: "{{ runner_nfs_mount_dir }}/immich"
43 nfs_path: "/mnt/rstorage/media/pictures"
44 host: "{{ runner_nas_host }}"
45 options: "{{ runner_nfs_options }}"
46
47 - name: "forgejo"
48 local_path: "{{ runner_nfs_mount_dir }}/forgejo"
49 nfs_path: "/mnt/rstorage/code-repo"
50 host: "{{ runner_nas_host }}"
51 options: "{{ runner_nfs_options }}"
52
53 - name: "harbor"
54 local_path: "{{ runner_nfs_mount_dir }}/harbor"
55 nfs_path: "/mnt/rstorage/registry-data"
56 host: "{{ runner_nas_host }}"
57 options: "{{ runner_nfs_options }}"
58
59 - name: "cvat"
60 local_path: "{{ runner_nfs_mount_dir }}/cvat"
61 nfs_path: "/mnt/rstorage/cvat-datasets"
62 host: "{{ runner_nas_host }}"
63 options: "{{ runner_nfs_options }}"
64
65# ==============================================================================
66# SERVICE CONFIGURATIONS
67# ==============================================================================
68
69# LLM Stack - Unified Local AI Infrastructure
70llm_stack_enabled: true
71llm_stack_config_dir: "/docker/llm-stack"
72
73# Unified LLM Stack Configuration
74llm_stack_ollama_port: 9000
75llm_stack_openwebui_port: 9001
76llm_stack_litellm_port: 9002
77
78# Ollama - Local LLM Server
79llm_stack_ollama_data_dir: "{{ llm_stack_config_dir }}/ollama/data"
80# GPU configuration uses global gpu_enabled parameter
81llm_stack_ollama_default_model: "qwen3.5:9b"
82llm_stack_ollama_keep_alive: "1h"
83llm_stack_ollama_log_level: "info"
84
85# Model lineup
86llm_stack_models:
87 - name: "qwen3.5:9b"
88 role: "default"
89 description: "General-purpose daily driver"
90 - name: "phi4:14b"
91 role: "coder"
92 description: "Coding and analytical tasks"
93 - name: "qwen2.5-coder:14b"
94 role: "coder"
95 description: "Coding specialist (Qwen 2.5 generation)"
96 - name: "deepseek-r1:14b"
97 role: "reasoning"
98 description: "Complex reasoning and chain-of-thought"
99 - name: "qwen3:8b"
100 role: "fast"
101 description: "Lightweight fast tasks"
102 - name: "qwen3:4b"
103 role: "minimal"
104 description: "Quick lightweight tasks"
105
106# OpenWebUI - Web Interface for Ollama
107llm_stack_openwebui_data_dir: "{{ llm_stack_config_dir }}/openwebui/data"
108llm_stack_openwebui_name: "Local AI Assistant"
109llm_stack_openwebui_description: "Self-hosted AI chat interface"
110llm_stack_openwebui_author: "Home Assistant"
111llm_stack_openwebui_default_models: "qwen3.5:9b"
112llm_stack_openwebui_log_level: "info"
113
114# LiteLLM - Unified LLM Proxy
115llm_stack_litellm_data_dir: "{{ llm_stack_config_dir }}/litellm/data"
116llm_stack_litellm_streaming_enabled: true
117llm_stack_litellm_log_level: "info"
118
119# Frigate - AI NVR System
120frigate_enabled: true
121frigate_port: 5000
122frigate_rtmp_port: 1935
123frigate_rtsp_port: 8554
124frigate_go2rtc_port: 1984
125frigate_config_dir: "/docker/frigate"
126frigate_data_dir: "{{ runner_nfs_mount_dir }}/frigate"
127frigate_mqtt_enabled: true
128mqtt_host: "homeassistant.home"
129mqtt_port: 1883
130frigate_hardware_acceleration: "vaapi" # vaapi, nvdec, nvenc, qsv, or none
131
132# Frigate ONVIF default settings
133frigate_onvif_autotracking: false
134
135# Frigate cameras configuration (from vault)
136frigate_cameras:
137 - name: "dining-room"
138 host: "{{ vault_runner.dining_room_camera_host | default('') }}"
139 username: "{{ vault_runner.dining_room_camera_user | default('') }}"
140 password: "{{ vault_runner.dining_room_camera_pass | default('') }}"
141 path: "/stream1"
142 port: 554
143 onvif_port: 2020
144 enabled: true
145
146 - name: "living-room"
147 host: "{{ vault_runner.living_room_camera_host | default('') }}"
148 username: "{{ vault_runner.living_room_camera_user | default('') }}"
149 password: "{{ vault_runner.living_room_camera_pass | default('') }}"
150 path: "/stream1"
151 port: 554
152 onvif_port: 2020
153 enabled: true
154
155 - name: "bed-room"
156 host: "{{ vault_runner.bed_room_camera_host | default('') }}"
157 username: "{{ vault_runner.bed_room_camera_user | default('') }}"
158 password: "{{ vault_runner.bed_room_camera_pass | default('') }}"
159 path: "/stream1"
160 port: 554
161 onvif_port: 2020
162 enabled: true
163
164 - name: "alina-office"
165 host: "{{ vault_runner.alina_office_camera_host | default('') }}"
166 username: "{{ vault_runner.alina_office_camera_user | default('') }}"
167 password: "{{ vault_runner.alina_office_camera_pass | default('') }}"
168 path: "/stream1"
169 port: 554
170 onvif_port: 2020
171 enabled: true
172
173 - name: "street-cam"
174 host: "{{ vault_runner.street_cam_host | default('') }}"
175 username: "{{ vault_runner.street_cam_user | default('') }}"
176 password: "{{ vault_runner.street_cam_pass | default('') }}"
177 path: "/stream1"
178 port: 554
179 onvif_port: 2020
180 enabled: true
181
182 - name: "pi-cam"
183 host: "{{ vault_runner.pi_cam_host | default('') }}"
184 username: "{{ vault_runner.pi_cam_user | default('') }}"
185 password: "{{ vault_runner.pi_cam_pass | default('') }}"
186 path: "{{ vault_runner.pi_cam_path | default('/doorbell') }}"
187 port: 8554
188 enabled: true
189
190# Cameras with ONVIF support (for PTZ control)
191frigate_onvif_cameras:
192 - name: "dining-room"
193 host: "{{ vault_runner.dining_room_camera_host | default('') }}"
194 port: 2020
195 username: "{{ vault_runner.dining_room_camera_user | default('') }}"
196 password: "{{ vault_runner.dining_room_camera_pass | default('') }}"
197 - name: "living-room"
198 host: "{{ vault_runner.living_room_camera_host | default('') }}"
199 port: 2020
200 username: "{{ vault_runner.living_room_camera_user | default('') }}"
201 password: "{{ vault_runner.living_room_camera_pass | default('') }}"
202 - name: "bed-room"
203 host: "{{ vault_runner.bed_room_camera_host | default('') }}"
204 port: 2020
205 username: "{{ vault_runner.bed_room_camera_user | default('') }}"
206 password: "{{ vault_runner.bed_room_camera_pass | default('') }}"
207 - name: "alina-office"
208 host: "{{ vault_runner.alina_office_camera_host | default('') }}"
209 port: 2020
210 username: "{{ vault_runner.alina_office_camera_user | default('') }}"
211 password: "{{ vault_runner.alina_office_camera_pass | default('') }}"
212 - name: "street-cam"
213 host: "{{ vault_runner.street_cam_host | default('') }}"
214 port: 2020
215 username: "{{ vault_runner.street_cam_user | default('') }}"
216 password: "{{ vault_runner.street_cam_pass | default('') }}"
217
218# Cameras for snapshot capture
219frigate_snapshot_cameras:
220 - "living-room"
221 - "dining-room"
222 - "bed-room"
223 - "alina-office"
224 - "street-cam"
225 - "pi-cam"
226
227# Per-camera record override (cameras listed here have recording disabled)
228frigate_cameras_record_disabled:
229 - "bed-room"
230
231# Frigate profile system (home=record-only, away=full detection)
232frigate_profiles:
233 home:
234 detect_enabled: false
235 detectors_enabled: false
236 cameras:
237 - street-cam
238 - pi-cam
239 hwaccel_override_cameras:
240 - street-cam
241 - pi-cam
242 default_profile: false
243 away:
244 detect_enabled: true
245 detectors_enabled: true
246 cameras:
247 - living-room
248 - dining-room
249 - bed-room
250 - alina-office
251 - street-cam
252 - pi-cam
253 default_profile: true
254
255# Frigate manager service
256frigate_manager_enabled: true
257frigate_snapshot_interval_minutes: 30
258frigate_profile_switch_timeout: 120
259
260# Immich - Photo Management
261immich_enabled: true
262immich_server_port: 2283
263immich_ml_port: 3003
264immich_config_dir: "/docker/immich"
265immich_data_dir: "/docker/immich"
266immich_upload_dir: "{{ runner_nfs_mount_dir }}/immich/library"
267immich_db_name: "{{ vault_runner.postgres_db | default('') }}"
268immich_db_user: "{{ vault_runner.postgres_user | default('') }}"
269immich_redis_enabled: true
270immich_ml_enabled: true
271immich_facial_recognition: true
272immich_hardware_acceleration: "none" # none, vaapi, nvdec, nvenc, or qsv
273
274# External library mounts (read-only photo libraries from NFS)
275immich_external_libraries:
276 - name: "yannick"
277 host_path: "{{ runner_nfs_mount_dir }}/immich/yannick"
278 container_path: "/yannick"
279 - name: "alina"
280 host_path: "{{ runner_nfs_mount_dir }}/immich/alina"
281 container_path: "/alina"
282
283# Forgejo - Git Server
284forgejo_enabled: true
285forgejo_http_port: 3010
286forgejo_ssh_port: 2222
287forgejo_config_dir: "/docker/forgejo"
288forgejo_data_dir: "{{ runner_nfs_mount_dir }}/forgejo"
289forgejo_db_type: "sqlite3"
290forgejo_app_name: "Forgejo Git Service"
291forgejo_domain: "forgejo.home"
292forgejo_ssh_domain: "{{ ansible_default_ipv4.address }}"
293
294# Forgejo Runner Configuration
295forgejo_runner_enabled: true
296forgejo_runner_token: "{{ vault_runner.forgejo_runner_token | default('changeme') }}"
297forgejo_runner_name: "default-runner"
298forgejo_runner_capacity: 2
299forgejo_runner_loglevel: info
300forgejo_runner_base_image: ubuntu:22.04
301forgejo_runner_user: runner
302forgejo_runner_uid: 1000
303forgejo_runner_version: 9.1.1
304
305# Forgejo Ansible Runner (for running Ansible playbooks in CI)
306forgejo_ansible_runner_enabled: true
307forgejo_ansible_runner_token: "{{ vault_runner.forgejo_ansible_runner_token | default('changeme') }}"
308forgejo_ansible_runner_name: "ansible-runner"
309forgejo_ansible_runner_capacity: 1
310forgejo_ansible_runner_version: 9.1.1
311
312# Web Tools - PDF Processing, File Conversion, Data Analysis, Developer Utilities
313web_tools_enabled: true
314web_tools_config_dir: "/docker/web-tools"
315web_tools_data_dir: "/docker/web-tools"
316
317# Stirling-PDF
318web_tools_stirling_port: 8090
319web_tools_stirling_max_file_size: 100
320
321# ConvertX
322web_tools_convertx_port: 8091
323web_tools_convertx_jwt_secret: "{{ vault_runner.web_tools_convertx_jwt_secret | default('changeme-generate-a-real-secret') }}"
324web_tools_convertx_auto_delete_hours: 24
325
326# CyberChef
327web_tools_cyberchef_port: 8092
328
329# IT-Tools
330web_tools_it_tools_port: 8093
331
332# Tandoor - Recipe Manager
333tandoor_enabled: true
334tandoor_port: 8010
335tandoor_config_dir: "/docker/tandoor"
336tandoor_data_dir: "/docker/tandoor"
337tandoor_media_dir: "{{ tandoor_data_dir }}/media"
338tandoor_static_dir: "{{ tandoor_data_dir }}/static"
339tandoor_db_engine: "django.db.backends.postgresql"
340
341# Ghost CMS - Headless CMS
342ghost_enabled: true
343ghost_port: 2368
344ghost_config_dir: "/docker/ghost"
345ghost_data_dir: "/docker/ghost"
346ghost_content_dir: "{{ ghost_data_dir }}/content"
347ghost_db_client: "mysql"
348ghost_db_host: "ghost-mysql"
349ghost_db_name: "ghost"
350ghost_db_user: "ghost"
351ghost_url: "http://ghost.home"
352
353cvat_config_dir: "/docker/cvat"
354# CVAT - Data labeling
355cvat_enabled: true
356
357cvat_repo_url: "https://github.com/cvat-ai/cvat.git"
358cvat_repo_version: "{{ cvat_image_tag }}"
359
360cvat_admin_username: admin
361cvat_admin_password: "{{ vault_runner.cvat_admin_password | default('change-me') }}"
362cvat_admin_email: "{{ vault_runner.cvat_admin_email | default('change-me') }}"
363
364# Networking / access
365cvat_domain: "cvat.home" # used by Traefik routing in CVAT compose
366cvat_http_port: 8990 # Traefik "web" entrypoint in the default compose
367cvat_https_enabled: false # add CVAT's https overlay when true
368
369cvat_share_dir: >-
370 {{ (runner_nfs_mounts
371 | selectattr('name','equalto','cvat')
372 | map(attribute='local_path')
373 | first)
374 | default(runner_nfs_mount_dir ~ '/cvat', true) }}
375
376# Versioning / images
377cvat_image_tag: "v2.44.3" # pulled via CVAT_VERSION; align with the git tag you run
378
379# Optional: serverless auto-annotation overlay (Nuclio/SAM/YOLO assist in CVAT)
380cvat_serverless_enabled: false
381
382# Optional: use an external Postgres instead of the bundled one
383cvat_external_db_enabled: false
384cvat_db_host: "postgres.internal"
385cvat_db_port: 5432
386cvat_db_name: "cvat"
387cvat_db_user: "cvat_user"
388cvat_db_password: "{{ vault_runner.cvat_db_password | default('change-me') }}"
389
390# Optional: expose Traefik dashboard (binds host port below)
391cvat_traefik_dashboard_enabled: false
392cvat_dashboard_port: 8899
393
394# Optional: GPU reservation for CVAT server container (you must have host GPU runtime ready)
395cvat_gpu_enabled: false
396cvat_gpu_driver: "nvidia"
397cvat_gpu_count: "all" # or a number like "1"
398
399# ==============================================================================
400# DATABASE CONFIGURATIONS
401# ==============================================================================
402
403# PostgreSQL (Immich)
404postgres_enabled: "{{ immich_enabled }}"
405postgres_config_dir: "/docker/immich/postgres"
406postgres_db: "{{ vault_runner.postgres_db | default('') }}"
407postgres_user: "{{ vault_runner.postgres_user | default('') }}"
408postgres_version: "14"
409
410# Redis (Immich)
411redis_enabled: "{{ immich_redis_enabled }}"
412redis_config_dir: "/docker/immich/redis"
413redis_port: 6379
414
415# MySQL (Ghost CMS)
416mysql_enabled: "{{ ghost_enabled }}"
417mysql_config_dir: "/docker/ghost/mysql"
418mysql_db: "{{ ghost_db_name }}"
419mysql_user: "{{ ghost_db_user }}"
420mysql_version: "8.0"
421
422# ==============================================================================
423# SECURITY SETTINGS (FROM VAULT)
424# ==============================================================================
425
426# Database passwords
427postgres_password: "{{ vault_runner.postgres_password | default('') }}"
428mysql_password: "{{ vault_runner.mysql_password | default('') }}"
429mysql_root_password: "{{ vault_runner.mysql_root_password | default('') }}"
430
431# Service secrets
432immich_jwt_secret: "{{ vault_runner.immich_jwt_secret | default('') }}"
433ghost_database_password: "{{ vault_runner.ghost_database_password | default('') }}"
434tandoor_secret_key: "{{ vault_runner.tandoor_secret_key | default('') }}"
435
436# MQTT credentials (from vault - top-level, shared across all roles)
437mqtt_username: ""
438mqtt_password: ""
439
440# ==============================================================================
441# DIRECTORY STRUCTURE
442# ==============================================================================
443
444# Local configuration directories
445runner_config_directories:
446 - "{{ llm_stack_config_dir }}"
447 - "{{ llm_stack_ollama_data_dir }}"
448 - "{{ llm_stack_openwebui_data_dir }}"
449 - "{{ llm_stack_litellm_data_dir }}"
450 - "{{ frigate_config_dir }}"
451 - "{{ immich_config_dir }}"
452 - "{{ immich_config_dir }}/postgres"
453 - "{{ immich_config_dir }}/redis"
454 - "{{ immich_config_dir }}/library"
455 - "{{ immich_config_dir }}/cache"
456 - "{{ immich_config_dir }}/model-cache"
457 - "{{ immich_config_dir }}/postgres-init"
458 - "{{ forgejo_config_dir }}"
459 - "{{ forgejo_config_dir }}/forgejo-runner-data"
460 - "{{ forgejo_config_dir }}/forgejo-ansible-runner-data"
461 - "{{ web_tools_config_dir }}"
462 - "{{ tandoor_config_dir }}"
463 - "{{ tandoor_data_dir }}/db"
464 - "{{ tandoor_data_dir }}/media"
465 - "{{ tandoor_data_dir }}/static"
466 - "{{ ghost_config_dir }}/config"
467 - "{{ ghost_config_dir }}/content"
468 - "{{ ghost_config_dir }}/mysql"
469
470# NFS mount directories
471runner_nfs_directories:
472 - "{{ runner_nfs_mount_dir }}"
473 - "{{ runner_nfs_mount_dir }}/frigate"
474 - "{{ runner_nfs_mount_dir }}/immich"
475 - "{{ runner_nfs_mount_dir }}/forgejo"
476 - "{{ runner_nfs_mount_dir }}/harbor"
477 - "{{ runner_nfs_mount_dir }}/cvat"
478
479# ==============================================================================
480# PERFORMANCE SETTINGS
481# ==============================================================================
482
483# Network performance tuning for NFS
484runner_performance_tuning_enabled: true
485runner_sysctl_settings:
486 # Extreme performance network buffers for Ryzen 7 + 32GB RAM
487 net.core.rmem_max: 268435456 # 256MB socket receive buffer
488 net.core.wmem_max: 268435456 # 256MB socket send buffer
489 net.core.rmem_default: 33554432 # 32MB default receive buffer
490 net.core.wmem_default: 33554432 # 32MB default send buffer
491 net.ipv4.tcp_rmem: "4096 131072 268435456" # TCP receive: 4KB min, 128KB default, 256MB max
492 net.ipv4.tcp_wmem: "4096 131072 268435456" # TCP send: 4KB min, 128KB default, 256MB max
493 net.core.netdev_max_backlog: 30000 # Handle high connection burst (32 connections)
494 net.ipv4.tcp_congestion_control: "bbr" # BBR congestion control
495 net.ipv4.tcp_window_scaling: 1 # Enable TCP window scaling
496 net.ipv4.tcp_timestamps: 1 # Enable TCP timestamps for RTT calculation
497 net.ipv4.tcp_sack: 1 # Enable selective acknowledgments
498 # NFS client cache tuning for 32GB RAM
499 vm.dirty_background_ratio: 3 # Start writeback at 3% (more aggressive)
500 vm.dirty_ratio: 8 # Force writeback at 8% (more aggressive)
501 vm.vfs_cache_pressure: 25 # Keep even more file cache (25% vs 50%)
502 vm.min_free_kbytes: 131072 # Keep 128MB free for network buffers
503
504# Harbor Configuration (external deployment)
505harbor_enabled: true
506harbor_config_dir: "/docker/harbor"
507harbor_version: "2.13.2"
508harbor_hostname: "{{ vault_runner.harbor_hostname | default('registry.local') }}"
509harbor_http_port: 8080
510harbor_registry_port: 5000
511harbor_admin_password: "{{ vault_runner.harbor_admin_password | default('changeme') }}"
512harbor_db_password: "{{ vault_runner.harbor_db_password | default('changeme') }}"
513harbor_data_volume: "{{ runner_nfs_mount_dir }}/harbor"
514
515# Docker resource limits
516default_memory_limit: "1g"
517default_cpu_limit: "1"
518
519# Health check configuration
520health_check_interval: "30s"
521health_check_timeout: "30s"
522health_check_retries: 5
523health_check_start_period: "60s"
524
525# ==============================================================================
526# SERVICE HEALTH ENDPOINTS
527# ==============================================================================
528service_endpoints:
529 ollama: "http://localhost:{{ llm_stack_ollama_port }}/api/tags"
530 openwebui: "http://localhost:{{ llm_stack_openwebui_port }}/api/health"
531 litellm: "http://localhost:{{ llm_stack_litellm_port }}/"
532 frigate: "http://localhost:{{ frigate_port }}/api/config"
533 immich: "http://localhost:{{ immich_server_port }}/api/server-info/ping"
534 forgejo: "http://localhost:{{ forgejo_http_port }}/api/v1/version"
535 stirling_pdf: "http://localhost:{{ web_tools_stirling_port }}/api/v1/info/status"
536 convertx: "http://localhost:{{ web_tools_convertx_port }}/"
537 cyberchef: "http://localhost:{{ web_tools_cyberchef_port }}/"
538 it_tools: "http://localhost:{{ web_tools_it_tools_port }}/"
539 tandoor: "http://localhost:{{ tandoor_port }}/accounts/login/"
540 ghost: "http://localhost:{{ ghost_port }}/ghost/api/admin/site/"
541
542# ==============================================================================
543# LOGGING CONFIGURATION
544# ==============================================================================
545logging_driver: "json-file"
546logging_max_size: "10m"
547logging_max_file: "3"
548
549# Service-specific logging levels (unified LLM stack uses llm_stack_* variables)
550# ollama_log_level: "info" # Now uses llm_stack_ollama_log_level
551# openwebui_log_level: "info" # Now uses llm_stack_openwebui_log_level
552# litellm_log_level: "info" # Now uses llm_stack_litellm_log_level
553frigate_log_level: "info"
554immich_log_level: "log"
555forgejo_log_level: "Info"
556ghost_logging: "info"
557
558