lint / yamllint + ansible-lint + syntax-check (push) Canceled after 0s
playbooks/dashboard.yml deploys Homepage as a second compose stack on the monitoring LXC (CT 155) next to Uptime Kuma and renders its config from homelab_services: one tile per service, link to its UI, grouped by Proxmox node. Adding a service to the registry is enough — no second service list. - new registry consumer: playbooks/dashboard.yml + playbooks/templates/homepage-*.j2 - homelab_dashboard_* vars in group_vars/all/services.yml (top-level, like homelab_reverse_proxy_*); image pinned by digest, floating tag needs an explicit -e dashboard_allow_floating_tag=true - bootstrap-dashboard-pve-token.yml: read-only homepage@pve!dashboard token (PVEAuditor) for the Proxmox widget, secret in the root .env as DASHBOARD_PVE_* - Makefile: dashboard, dry-dashboard, bootstrap-dashboard-token - container binds the LAN address only (192.168.1.30:8082), not published via Caddy - docs: architecture.md Monitoring section, plan.md active task, consumer lists Deployed to CT 155 on 2026-09-03: container healthy, http://192.168.1.30:8082/ returns 200, `make dashboard` idempotent, `make validate` and `make lint` green. Pending operator steps: `make bootstrap-dashboard-token` (blocked in the agent session as credential creation) and an Uptime Kuma status page with slug homelab. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KbuZrUoevfBgCpf5DCF4DG
71 lines
2.7 KiB
Django/Jinja
71 lines
2.7 KiB
Django/Jinja
#jinja2: trim_blocks: True, lstrip_blocks: True
|
|
# {{ ansible_managed }}
|
|
# Рендерится playbooks/dashboard.yml ИЗ реестра homelab_services. НЕ править
|
|
# на хосте: меняй сервисы в ansible/inventory/group_vars/all/services.yml,
|
|
# затем `make dashboard`.
|
|
#
|
|
# Правило ссылки на сервис:
|
|
# * есть proxy.domain -> https://<domain> (+ siteMonitor)
|
|
# * иначе первый веб-порт -> http(s)://<ip>:<port> (+ siteMonitor для http)
|
|
# приоритет имён портов: http > ui > setup > uptime-kuma > grafana >
|
|
# controller > pbs-api
|
|
# * ни того, ни другого -> группа Headless, только ICMP ping по ip
|
|
{% set port_priority = ['http', 'ui', 'setup', 'uptime-kuma', 'grafana', 'controller', 'pbs-api'] %}
|
|
{% if homelab_dashboard_proxmox_url | default('') | length > 0 %}
|
|
- Infrastructure:
|
|
- Proxmox кластер:
|
|
description: cloud-pc + mini-pc
|
|
widget:
|
|
type: proxmox
|
|
url: {{ homelab_dashboard_proxmox_url }}
|
|
username: "{{ '{{HOMEPAGE_VAR_PROXMOX_USER}}' }}"
|
|
password: "{{ '{{HOMEPAGE_VAR_PROXMOX_TOKEN}}' }}"
|
|
{% endif %}
|
|
{% for node in dashboard_nodes %}
|
|
- {{ node }}:
|
|
{% for name, svc in homelab_services | dictsort %}
|
|
{% if svc.node == node %}
|
|
{% set proxy = svc.proxy | default({}) %}
|
|
{% set ns = namespace(scheme='', port=0) %}
|
|
{% for pref in port_priority %}
|
|
{% for p in svc.ports | default([]) %}
|
|
{% if ns.port == 0 and p.name == pref %}
|
|
{% set ns.port = p.port %}
|
|
{% set ns.scheme = 'https' if pref == 'pbs-api' else 'http' %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% if proxy.domain is defined %}
|
|
- {{ name }}:
|
|
href: https://{{ proxy.domain }}
|
|
description: {{ svc.role }}
|
|
siteMonitor: https://{{ proxy.domain }}
|
|
{% elif ns.port > 0 %}
|
|
- {{ name }}:
|
|
href: {{ ns.scheme }}://{{ svc.ip }}:{{ ns.port }}
|
|
description: {{ svc.role }}
|
|
{% if ns.scheme == 'http' %}
|
|
siteMonitor: http://{{ svc.ip }}:{{ ns.port }}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
- Headless:
|
|
{% for name, svc in homelab_services | dictsort %}
|
|
{% set proxy = svc.proxy | default({}) %}
|
|
{% set ns = namespace(web=false) %}
|
|
{% for pref in port_priority %}
|
|
{% for p in svc.ports | default([]) %}
|
|
{% if p.name == pref %}
|
|
{% set ns.web = true %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% if proxy.domain is not defined and not ns.web %}
|
|
- {{ name }}:
|
|
description: {{ svc.role }}
|
|
ping: {{ svc.ip }}
|
|
{% endif %}
|
|
{% endfor %}
|