From 7e5f3151af9966d464fa674b310af083c68d3d61 Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 20 Nov 2025 04:58:04 +0000 Subject: [PATCH] Update 3 files - /group_vars/all.yml - /roles/mumble/tasks/main.yml - /roles/mumble/templates/docker-compose.yml.j2 --- group_vars/all.yml | 15 ++++++++++++- roles/mumble/tasks/main.yml | 23 +++++++++++++++----- roles/mumble/templates/docker-compose.yml.j2 | 3 ++- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/group_vars/all.yml b/group_vars/all.yml index 4482f63..f6e150c 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -4,6 +4,18 @@ timezone: Asia/Yekaterinburg system_locale: ru_RU.UTF-8 x11_display_host: "192.168.1.101" +# ------------ Сетевые адреса серверов ------------ +server_ips: + olimp: "192.168.1.200" + gateway: "192.168.1.201" + data: "192.168.1.202" + media: "192.168.1.203" + photo: "192.168.1.204" + nextcloud: "192.168.1.205" + talk: "192.168.1.206" + games: "192.168.1.207" + manage: "192.168.1.228" + # ------------ Группы серверов для мониторинга ------------ monitoring_groups: # Все серверы с node_exporter @@ -179,6 +191,7 @@ immich_db_name: "immich" immich_version: "release" # ------------ talk (192.168.1.206) ------------ +# Mumble mumble_base_dir: "/mnt/mumble" mumble_data_dir: "{{ mumble_base_dir }}/data" mumble_port: "45131" @@ -186,7 +199,7 @@ mumble_ice_port: "6502" mumble_server_password: "{{ vault_mumble_server_password }}" mumble_superuser_password: "{{ vault_mumble_superuser_password }}" mumble_max_users: "100" - +# Matrix matrix_base_dir: "/mnt/matrix" matrix_data_dir: "{{ matrix_base_dir }}/data" matrix_config_dir: "{{ matrix_base_dir }}/config" diff --git a/roles/mumble/tasks/main.yml b/roles/mumble/tasks/main.yml index e67bf01..8cc9b38 100644 --- a/roles/mumble/tasks/main.yml +++ b/roles/mumble/tasks/main.yml @@ -1,12 +1,25 @@ --- -- name: Create Mumble directories +- name: Create Mumble directories with correct permissions file: - path: "{{ item }}" + path: "{{ item.path }}" state: directory - mode: 0755 + mode: "{{ item.mode }}" + owner: "{{ item.owner }}" + group: "{{ item.group }}" loop: - - "{{ mumble_base_dir }}" - - "{{ mumble_data_dir }}" + - { path: "{{ mumble_base_dir }}", mode: "0755", owner: "root", group: "root" } + - { path: "{{ mumble_data_dir }}", mode: "0755", owner: "1000", group: "1000" } + become: yes + +- name: Ensure Mumble data directory permissions are correct recursively + file: + path: "{{ mumble_data_dir }}" + state: directory + mode: "0755" + owner: "1000" + group: "1000" + recurse: yes + become: yes - name: Deploy Mumble docker-compose.yml template: diff --git a/roles/mumble/templates/docker-compose.yml.j2 b/roles/mumble/templates/docker-compose.yml.j2 index beceff4..fcecfd9 100644 --- a/roles/mumble/templates/docker-compose.yml.j2 +++ b/roles/mumble/templates/docker-compose.yml.j2 @@ -3,6 +3,7 @@ services: mumble-server: image: mumblevoip/mumble-server:latest container_name: mumble-server + user: "1000:1000" ports: - "{{ mumble_port }}:64738/tcp" - "{{ mumble_port }}:64738/udp" @@ -10,7 +11,7 @@ services: volumes: - "{{ mumble_data_dir }}:/data" environment: - - MUMBLE_CONFIG_welcometext=
Коля питух, объелся мух
Приятного общения!
+ - MUMBLE_CONFIG_welcometext="
Коля питух, объелся мух
Приятного общения!
" - TZ={{ timezone }} - MUMBLE_CONFIG_SERVER_PASSWORD={{ mumble_server_password }} - MUMBLE_SUPERUSER_PASSWORD={{ mumble_superuser_password }}