diff --git a/group_vars/all.yml b/group_vars/all.yml index dcb34c3..6d63665 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -30,30 +30,35 @@ custom_directories: - /opt/scripts - /etc/apt/keyrings -# Docker services variables +# ------------192.168.1.201 gateway------------ + +# MNP npm_base_dir: "/opt/npm" npm_data_dir: "/opt/npm/data" npm_letsencrypt_dir: "/opt/npm/letsencrypt" +# Heimdall heimdall_base_dir: "/opt/heimdall" heimdall_config_dir: "/opt/heimdall/config" heimdall_port: "45131" -# Bookstack variables +# ------------192.168.1.202 data------------ + +# Bookstack bookstack_base_dir: "/mnt/bookstack" bookstack_config_dir: "/mnt/bookstack/config" bookstack_uploads_dir: "/mnt/bookstack/uploads" bookstack_db_dir: "/mnt/bookstack/db" bookstack_port: "45133" -# Mealie variables +# Mealie mealie_base_dir: "/mnt/mealie" mealie_data_dir: "/mnt/mealie/data" mealie_port: "45132" mealie_db_type: "sqlite" mealie_db_password: "secure_password_123" -# Bitwarden variables +# Bitwarden bitwarden_base_dir: "/mnt/bitwarden" bitwarden_data_dir: "{{ bitwarden_base_dir }}/vw-data" bitwarden_port: "45131" @@ -69,7 +74,9 @@ bitwarden_smtp_password: "khhyw8Ri9WrabwqM2vbC" bitwarden_smtp_from: "zailon@bk.ru" bitwarden_domain: "https://bw.zailon.ru" -# Media services base directories +# ------------192.168.1.203 media------------ + +# Media базовые дериктории service_config_base: "/mnt/service" # Jellyfin @@ -95,4 +102,15 @@ ampache_base_dir: "{{ service_config_base }}/ampache" ampache_config_dir: "{{ ampache_base_dir }}/config" ampache_logs_dir: "{{ ampache_base_dir }}/logs" ampache_mysql_dir: "{{ ampache_base_dir }}/mysql" -ampache_port: "45134" \ No newline at end of file +ampache_port: "45134" + +# ------------192.168.1.206 talk------------ + +# Mumble +mumble_base_dir: "/mnt/mumble" +mumble_data_dir: "{{ mumble_base_dir }}/data" +mumble_port: "45131" +mumble_ice_port: "6502" +mumble_server_password: "passw0rd" +mumble_superuser_password: "13qeadZC" +mumble_max_users: "100" \ No newline at end of file diff --git a/inventories/hosts b/inventories/hosts index 9c678b0..8e64d42 100644 --- a/inventories/hosts +++ b/inventories/hosts @@ -1,7 +1,8 @@ [infra] -gateway ansible_host=192.168.1.221 int_ip=192.168.1.221 +gateway ansible_host=192.168.1.201 int_ip=192.168.1.201 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 +talk ansible_host=192.168.1.226 int_ip=192.168.1.226 [gateway] gateway @@ -10,4 +11,7 @@ gateway data [media] -media \ No newline at end of file +media + +[talk] +talk \ No newline at end of file diff --git a/olimp-deploy.yml b/olimp-deploy.yml index 485ce7b..89a08d9 100644 --- a/olimp-deploy.yml +++ b/olimp-deploy.yml @@ -19,3 +19,8 @@ roles: - { role: docker, tags: deploy_docker } - { role: ampache, tags: deploy_ampache } + +- hosts: talk + roles: + - { role: docker, tags: deploy_docker } + - { role: mumble, tags: deploy_mumble } \ No newline at end of file diff --git a/roles/mumble/tasks/main.yml b/roles/mumble/tasks/main.yml new file mode 100644 index 0000000..e67bf01 --- /dev/null +++ b/roles/mumble/tasks/main.yml @@ -0,0 +1,35 @@ +--- +- name: Create Mumble directories + file: + path: "{{ item }}" + state: directory + mode: 0755 + loop: + - "{{ mumble_base_dir }}" + - "{{ mumble_data_dir }}" + +- name: Deploy Mumble docker-compose.yml + template: + src: docker-compose.yml.j2 + dest: "{{ mumble_base_dir }}/docker-compose.yml" + mode: 0644 + +- name: Start Mumble services + shell: | + cd {{ mumble_base_dir }} + docker compose up -d + args: + executable: /bin/bash + +- name: Wait for services to start + pause: + seconds: 10 + +- name: Check Mumble container status + shell: docker ps --filter name=mumble-server + register: mumble_status + changed_when: false + +- name: Show Mumble status + debug: + var: mumble_status.stdout \ No newline at end of file diff --git a/roles/mumble/templates/docker-compose.yml.j2 b/roles/mumble/templates/docker-compose.yml.j2 new file mode 100644 index 0000000..39fefcd --- /dev/null +++ b/roles/mumble/templates/docker-compose.yml.j2 @@ -0,0 +1,17 @@ +version: '3.8' +services: + mumble-server: + image: mumblevoip/mumble-server:latest + container_name: mumble-server + ports: + - "{{ mumble_port }}:64738/tcp" + - "{{ mumble_port }}:64738/udp" + - "{{ mumble_ice_port }}:6502/tcp" # ICE/RPC порт (опционально) + volumes: + - "{{ mumble_data_dir }}:/data" + environment: + - TZ={{ timezone }} + - MUMBLE_CONFIG_SERVER_PASSWORD={{ mumble_server_password }} + - MUMBLE_SUPERUSER_PASSWORD={{ mumble_superuser_password }} + - MUMBLE_USERS={{ mumble_max_users }} + restart: always \ No newline at end of file