/
/
/
Ansible role that deployes services on my runner machine
1---
2# Runner Services Role - Main Tasks
3
4- name: Check if runner role is enabled
5 fail:
6 msg: "Runner role is disabled. Set runner_enabled: true to enable."
7 when: not runner_enabled
8 tags: always
9
10- name: Display runner role start message
11 debug:
12 msg: "Starting Runner Services deployment with {{ ansible_play_hosts | length }} host(s)"
13 tags: always
14
15# Validate vault secrets before proceeding
16- name: Include vault variable validation
17 include_tasks: validate-vault.yml
18 tags: [always, validation]
19
20# Prerequisites and system setup
21- name: Include prerequisites tasks
22 include_tasks: prerequisites.yml
23 tags:
24 - runner
25 - prerequisites
26 - setup
27
28# Fix existing directory permissions
29- name: Include permission fixing tasks
30 include_tasks: fix-permissions.yml
31 tags:
32 - runner
33 - permissions
34 - fix
35
36# Performance tuning
37- name: Include performance tuning tasks
38 include_tasks: performance.yml
39 when: runner_performance_tuning_enabled
40 tags:
41 - runner
42 - performance
43 - tuning
44
45# NFS mount configuration
46- name: Include NFS mount tasks
47 include_tasks: nfs-mounts.yml
48 when: runner_nfs_enabled
49 tags:
50 - runner
51 - nfs
52 - mounts
53
54# Docker network setup
55- name: Include docker network tasks
56 include_tasks: docker-network.yml
57 tags:
58 - runner
59 - docker
60 - network
61
62# Service deployments
63- name: Include Frigate deployment
64 import_tasks: frigate.yml
65 when: frigate_enabled
66 tags:
67 - frigate
68
69- name: Include Immich deployment
70 import_tasks: immich.yml
71 when: immich_enabled
72 tags:
73 - immich
74
75- name: Include Forgejo deployment
76 import_tasks: forgejo.yml
77 when: forgejo_enabled
78 tags:
79 - forgejo
80
81- name: Include Stirling-PDF deployment
82 import_tasks: stirling-pdf.yml
83 when: stirling_pdf_enabled
84 tags:
85 - stirling-pdf
86
87- name: Include Tandoor deployment
88 import_tasks: tandoor.yml
89 when: tandoor_enabled
90 tags:
91 - tandoor
92
93- name: Include Ghost CMS deployment
94 import_tasks: ghost.yml
95 when: ghost_enabled
96 tags:
97 - ghost
98
99- name: Include CVAT deployment
100 import_tasks: cvat.yml
101 when: cvat_enabled
102 tags:
103 - cvat
104
105- name: Include Harbor deployment
106 import_tasks: harbor.yml
107 when: harbor_enabled
108 tags:
109 - harbor
110
111- name: Include LLM Stack deployment
112 import_tasks: llm-stack.yml
113 when: llm_stack_enabled
114 tags:
115 - llm-stack
116 - ollama
117 - openwebui
118 - litellm
119
120- name: Display runner deployment summary
121 debug:
122 msg: |
123 Runner Services deployment completed successfully!
124
125 Services Status:
126 - LLM Stack (AI): {{ 'Enabled' if llm_stack_enabled else 'Disabled' }}
127 - Frigate (CCTV): {{ 'Enabled' if frigate_enabled else 'Disabled' }}
128 - Immich (Photos): {{ 'Enabled' if immich_enabled else 'Disabled' }}
129 - Forgejo (Git): {{ 'Enabled' if forgejo_enabled else 'Disabled' }}
130 - Harbor (Registry): {{ 'Enabled' if harbor_enabled else 'Disabled' }}
131 - Stirling-PDF: {{ 'Enabled' if stirling_pdf_enabled else 'Disabled' }}
132 - Tandoor (Recipes): {{ 'Enabled' if tandoor_enabled else 'Disabled' }}
133 - Ghost CMS: {{ 'Enabled' if ghost_enabled else 'Disabled' }}
134 - CVAT: {{ 'Enabled' if cvat_enabled else 'Disabled' }}
135
136 Access Information:
137 {% if llm_stack_enabled %}
138 - Ollama: http://{{ ansible_default_ipv4.address }}:{{ llm_stack_ollama_port }}
139 - OpenWebUI: http://{{ ansible_default_ipv4.address }}:{{ llm_stack_openwebui_port }}
140 - LiteLLM: http://{{ ansible_default_ipv4.address }}:{{ llm_stack_litellm_port }}
141 {% endif %}
142 {% if frigate_enabled %}
143 - Frigate: http://{{ ansible_default_ipv4.address }}:{{ frigate_port }}
144 {% endif %}
145 {% if immich_enabled %}
146 - Immich: http://{{ ansible_default_ipv4.address }}:{{ immich_server_port }}
147 {% endif %}
148 {% if forgejo_enabled %}
149 - Forgejo: http://{{ ansible_default_ipv4.address }}:{{ forgejo_http_port }}
150 - Forgejo SSH: ssh://git@{{ ansible_default_ipv4.address }}:{{ forgejo_ssh_port }}
151 {% endif %}
152 {% if harbor_enabled %}
153 - Harbor Registry: http://{{ ansible_default_ipv4.address }}:{{ harbor_http_port | default(8080) }}
154 - Harbor Admin: admin/{{ harbor_admin_password | default('Harbor12345') }}
155 {% endif %}
156 {% if stirling_pdf_enabled %}
157 - Stirling-PDF: http://{{ ansible_default_ipv4.address }}:{{ stirling_pdf_port }}
158 {% endif %}
159 {% if tandoor_enabled %}
160 - Tandoor: http://{{ ansible_default_ipv4.address }}:{{ tandoor_port }}
161 {% endif %}
162 {% if ghost_enabled %}
163 - Ghost CMS: http://{{ ansible_default_ipv4.address }}:{{ ghost_port }}
164 {% endif %}
165 {% if cvat_enabled %}
166 - CVAT: http://{{ cvat_domain }}
167 {% endif %}
168
169 Management Scripts: /usr/local/bin/runner-*
170
171 Service Directories (Consolidated Structure):
172 - LLM Stack: {{ llm_stack_config_dir }}
173 - Ollama Data: {{ llm_stack_ollama_data_dir }}
174 - OpenWebUI Data: {{ llm_stack_openwebui_data_dir }}
175 - LiteLLM Data: {{ llm_stack_litellm_data_dir }}
176 - Frigate: {{ frigate_config_dir }}
177 - Immich: {{ immich_config_dir }}
178 - Forgejo: {{ forgejo_config_dir }}
179 - Harbor: {{ harbor_config_dir }}
180 - Stirling-PDF: {{ stirling_pdf_config_dir }}
181 - Tandoor: {{ tandoor_config_dir }}
182 - Ghost: {{ ghost_config_dir }}
183 - CVAT: {{ cvat_config_dir }}
184
185 NFS Mounts: {{ runner_nfs_mount_dir }}
186 tags: always
187