Update 5 files

- /group_vars/all.yml
- /roles/meshcentral/tasks/main.yml
- /roles/meshcentral/templates/docker-compose.yml.j2
- /inventories/hosts
- /olimp-deploy.yml
This commit is contained in:
Administrator 2025-10-17 05:34:16 +00:00
parent b8aaabc043
commit fe3fc4f5f3
5 changed files with 82 additions and 4 deletions

View File

@ -125,4 +125,18 @@ immich_db_username: "postgres"
immich_db_password: "postgres"
immich_db_name: "immich"
immich_version: "release"
# immich_public_url: "https://photos.yourdomain.com" # раскомментирую если нужно
# immich_public_url: "https://photos.yourdomain.com" # раскомментирую если нужно
# ------------192.168.1.208 manage------------
# MeshCentral
meshcentral_base_dir: "/opt/meshcentral"
meshcentral_data_dir: "/mnt/mesh/meshcentral-data"
meshcentral_files_dir: "/mnt/mesh/meshcentral-files"
meshcentral_backup_dir: "/mnt/mesh/meshcentral-backup"
meshcentral_port: "45131"
# Grafana (для будущего использования)
grafana_base_dir: "/opt/grafana"
grafana_data_dir: "{{ grafana_base_dir }}/data"
grafana_port: "45132"

View File

@ -4,6 +4,10 @@ data ansible_host=192.168.1.222 int_ip=192.168.1.222
media ansible_host=192.168.1.223 int_ip=192.168.1.223
photo ansible_host=192.168.1.224 int_ip=192.168.1.224
talk ansible_host=192.168.1.226 int_ip=192.168.1.226
cloud ansible_host=192.168.1.225 int_ip=192.168.1.225
manage ansible_host=192.168.1.228 int_ip=192.168.1.228
gitlab ansible_host=192.168.1.229 int_ip=192.168.1.229
[gateway]
gateway
@ -18,4 +22,7 @@ media
photo
[talk]
talk
talk
[manage]
manage

View File

@ -26,8 +26,13 @@
roles:
- { role: docker, tags: deploy_docker }
- { role: immich, tags: deploy_immich }
- hosts: talk
roles:
- { role: docker, tags: deploy_docker }
- { role: mumble, tags: deploy_mumble }
- { role: mumble, tags: deploy_mumble }
- hosts: manage
roles:
- { role: docker, tags: deploy_docker }
- { role: meshcentral, tags: deploy_meshcentral }

View File

@ -0,0 +1,37 @@
---
- name: Create MeshCentral directory structure
file:
path: "{{ item }}"
state: directory
mode: 0755
loop:
- "{{ meshcentral_base_dir }}"
- "{{ meshcentral_data_dir }}"
- "{{ meshcentral_files_dir }}"
- "{{ meshcentral_backup_dir }}"
- name: Deploy MeshCentral docker-compose.yml
template:
src: docker-compose.yml.j2
dest: "{{ meshcentral_base_dir }}/docker-compose.yml"
mode: 0644
- name: Start MeshCentral services
shell: |
cd {{ meshcentral_base_dir }}
docker compose up -d
args:
executable: /bin/bash
- name: Wait for services to start
pause:
seconds: 15
- name: Check MeshCentral container status
shell: docker ps --filter name=meshcentral
register: meshcentral_status
changed_when: false
- name: Show MeshCentral status
debug:
var: meshcentral_status.stdout

View File

@ -0,0 +1,15 @@
version: '2'
services:
meshcentral:
container_name: meshcentral
image: ghcr.io/gurucomputing/meshcentral-docker:latest
restart: unless-stopped
environment:
- TZ={{ timezone }}
volumes:
- {{ meshcentral_data_dir }}:/meshcentral/meshcentral-data
- {{ meshcentral_files_dir }}:/meshcentral/meshcentral-files
- {{ meshcentral_backup_dir }}:/meshcentral/meshcentral-backup
- /etc/localtime:/etc/localtime:ro
ports:
- {{ meshcentral_port }}:80