Update 5 files
- /group_vars/all.yml - /roles/dashy/tasks/main.yml - /roles/dashy/templates/docker-compose.yml.j2 - /roles/dashy/templates/conf.yml.j2 - /olimp-deploy.yml
This commit is contained in:
parent
874ef5036e
commit
b64aa84531
@ -42,6 +42,12 @@ heimdall_base_dir: "/opt/heimdall"
|
|||||||
heimdall_config_dir: "/opt/heimdall/config"
|
heimdall_config_dir: "/opt/heimdall/config"
|
||||||
heimdall_port: "45131"
|
heimdall_port: "45131"
|
||||||
|
|
||||||
|
# ------------ Dashy ------------
|
||||||
|
dashy_base_dir: "/opt/dashy"
|
||||||
|
dashy_config_dir: "{{ dashy_base_dir }}/config"
|
||||||
|
dashy_port: "45132"
|
||||||
|
dashy_domain: "start.zailon.ru"
|
||||||
|
|
||||||
# ------------192.168.1.202 data------------
|
# ------------192.168.1.202 data------------
|
||||||
|
|
||||||
# Bookstack
|
# Bookstack
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
- { role: docker, tags: deploy_docker }
|
- { role: docker, tags: deploy_docker }
|
||||||
- { role: npm, tags: deploy_npm }
|
- { role: npm, tags: deploy_npm }
|
||||||
- { role: heimdall, tags: deploy_heimdall }
|
- { role: heimdall, tags: deploy_heimdall }
|
||||||
|
- { role: dashy, tags: deploy_dashy }
|
||||||
- hosts: data
|
- hosts: data
|
||||||
roles:
|
roles:
|
||||||
- { role: docker, tags: deploy_docker }
|
- { role: docker, tags: deploy_docker }
|
||||||
|
|||||||
57
roles/dashy/tasks/main.yml
Normal file
57
roles/dashy/tasks/main.yml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
---
|
||||||
|
- name: Create Dashy directories
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
mode: 0755
|
||||||
|
loop:
|
||||||
|
- "{{ dashy_base_dir }}"
|
||||||
|
- "{{ dashy_config_dir }}"
|
||||||
|
|
||||||
|
- name: Create Dashy configuration file
|
||||||
|
template:
|
||||||
|
src: conf.yml.j2
|
||||||
|
dest: "{{ dashy_config_dir }}/conf.yml"
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
- name: Deploy Dashy docker-compose.yml
|
||||||
|
template:
|
||||||
|
src: docker-compose.yml.j2
|
||||||
|
dest: "{{ dashy_base_dir }}/docker-compose.yml"
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
- name: Stop and remove Heimdall container if exists
|
||||||
|
shell: |
|
||||||
|
cd {{ heimdall_base_dir }} && docker compose down
|
||||||
|
ignore_errors: yes
|
||||||
|
when: "'gateway' in group_names"
|
||||||
|
|
||||||
|
- name: Start Dashy container
|
||||||
|
shell: |
|
||||||
|
cd {{ dashy_base_dir }}
|
||||||
|
docker compose up -d
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
|
||||||
|
- name: Wait for Dashy to start
|
||||||
|
pause:
|
||||||
|
seconds: 10
|
||||||
|
|
||||||
|
- name: Check Dashy container status
|
||||||
|
shell: docker ps --filter name=dashy
|
||||||
|
register: dashy_status
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Show Dashy status
|
||||||
|
debug:
|
||||||
|
var: dashy_status.stdout
|
||||||
|
|
||||||
|
- name: Verify Dashy is accessible
|
||||||
|
uri:
|
||||||
|
url: "http://{{ ansible_host }}:{{ dashy_port }}"
|
||||||
|
status_code: 200
|
||||||
|
timeout: 30
|
||||||
|
register: dashy_accessible
|
||||||
|
until: dashy_accessible.status == 200
|
||||||
|
retries: 5
|
||||||
|
delay: 5
|
||||||
108
roles/dashy/templates/conf.yml.j2
Normal file
108
roles/dashy/templates/conf.yml.j2
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
appConfig:
|
||||||
|
theme: auto
|
||||||
|
language: ru
|
||||||
|
layout: auto
|
||||||
|
iconSize: medium
|
||||||
|
preventLoad: false
|
||||||
|
|
||||||
|
pageInfo:
|
||||||
|
title: "Zailon Server Dashboard"
|
||||||
|
description: "Домашняя инфраструктура сервисов"
|
||||||
|
navLinks:
|
||||||
|
- title: "GitLab"
|
||||||
|
path: "https://gitlab.zailon.ru"
|
||||||
|
- title: "Grafana"
|
||||||
|
path: "https://grafana.zailon.ru"
|
||||||
|
- title: "Proxmox"
|
||||||
|
path: "https://192.168.1.200:8006"
|
||||||
|
|
||||||
|
sections:
|
||||||
|
- name: Медиа
|
||||||
|
icon: fas play-circle
|
||||||
|
items:
|
||||||
|
- name: "Jellyfin"
|
||||||
|
description: "Фильмы и сериалы"
|
||||||
|
icon: "fas play-circle"
|
||||||
|
url: "https://jellyfin.zailon.ru"
|
||||||
|
color: "#00a4dc"
|
||||||
|
- name: "Audiobookshelf"
|
||||||
|
description: "Аудиокниги и подкасты"
|
||||||
|
icon: "fas headphones"
|
||||||
|
url: "https://audiobookshelf.zailon.ru"
|
||||||
|
color: "#5865f2"
|
||||||
|
- name: "Calibre-Web"
|
||||||
|
description: "Электронные книги"
|
||||||
|
icon: "fas book-open"
|
||||||
|
url: "https://calibre.zailon.ru"
|
||||||
|
color: "#2e7d32"
|
||||||
|
- name: "Ampache"
|
||||||
|
description: "Музыкальная библиотека"
|
||||||
|
icon: "fas music"
|
||||||
|
url: "https://ampache.zailon.ru"
|
||||||
|
color: "#e91e63"
|
||||||
|
|
||||||
|
- name: Файлы и данные
|
||||||
|
icon: fas cloud
|
||||||
|
items:
|
||||||
|
- name: "Nextcloud"
|
||||||
|
description: "Файловое облако"
|
||||||
|
icon: "fas cloud"
|
||||||
|
url: "https://cloud.zailon.ru"
|
||||||
|
color: "#0082c9"
|
||||||
|
- name: "Vaultwarden"
|
||||||
|
description: "Менеджер паролей"
|
||||||
|
icon: "fas key"
|
||||||
|
url: "https://bw.zailon.ru"
|
||||||
|
color: "#175ddc"
|
||||||
|
- name: "BookStack"
|
||||||
|
description: "База знаний"
|
||||||
|
icon: "fas book"
|
||||||
|
url: "https://bookstack.zailon.ru"
|
||||||
|
color: "#0288d1"
|
||||||
|
|
||||||
|
- name: Фотографии
|
||||||
|
icon: fas images
|
||||||
|
items:
|
||||||
|
- name: "Immich"
|
||||||
|
description: "Бекап фотографий"
|
||||||
|
icon: "fas images"
|
||||||
|
url: "https://immich.zailon.ru"
|
||||||
|
color: "#4263f5"
|
||||||
|
|
||||||
|
- name: Утилиты
|
||||||
|
icon: fas tools
|
||||||
|
items:
|
||||||
|
- name: "Mealie"
|
||||||
|
description: "Кулинарные рецепты"
|
||||||
|
icon: "fas utensils"
|
||||||
|
url: "https://mealie.zailon.ru"
|
||||||
|
color: "#3a8bbb"
|
||||||
|
- name: "Mumble"
|
||||||
|
description: "Голосовой чат"
|
||||||
|
icon: "fas users"
|
||||||
|
url: "https://mumble.zailon.ru"
|
||||||
|
color: "#5e35b1"
|
||||||
|
- name: "MeshCentral"
|
||||||
|
description: "Удалённое управление"
|
||||||
|
icon: "fas desktop"
|
||||||
|
url: "https://mesh.zailon.ru"
|
||||||
|
color: "#007acc"
|
||||||
|
|
||||||
|
- name: Администрирование
|
||||||
|
icon: fas cogs
|
||||||
|
items:
|
||||||
|
- name: "NPM"
|
||||||
|
description: "Прокси менеджер"
|
||||||
|
icon: "fas network-wired"
|
||||||
|
url: "https://npm.zailon.ru"
|
||||||
|
color: "#2496ed"
|
||||||
|
- name: "GitLab"
|
||||||
|
description: "Система контроля версий"
|
||||||
|
icon: "fas code-branch"
|
||||||
|
url: "https://gitlab.zailon.ru"
|
||||||
|
color: "#fc6d26"
|
||||||
|
- name: "Grafana"
|
||||||
|
description: "Метрики и мониторинг"
|
||||||
|
icon: "fas chart-line"
|
||||||
|
url: "https://grafana.zailon.ru"
|
||||||
|
color: "#f46800"
|
||||||
14
roles/dashy/templates/docker-compose.yml.j2
Normal file
14
roles/dashy/templates/docker-compose.yml.j2
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
version: '3.8'
|
||||||
|
services:
|
||||||
|
dashy:
|
||||||
|
image: lscr.io/linuxserver/dashy:latest
|
||||||
|
container_name: dashy
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "{{ dashy_port }}:80"
|
||||||
|
volumes:
|
||||||
|
- {{ dashy_config_dir }}:/app/user-data
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ={{ timezone }}
|
||||||
Loading…
Reference in New Issue
Block a user