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