Update 4 files

- /olimp-deploy.yml
- /roles/bitwarden/tasks/main.yml
- /roles/bitwarden/templates/docker-compose.yml.j2
- /group_vars/all.yml
This commit is contained in:
Administrator 2025-10-16 10:20:32 +00:00
parent 4cdad4e62f
commit 5cffd8b308
4 changed files with 75 additions and 7 deletions

View File

@ -44,15 +44,31 @@ 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: "45131"
bookstack_port: "45133"
# Mealie variables
mealie_base_dir: "/mnt/mealie"
mealie_data_dir: "/mnt/mealie/data"
mealie_port: "45132"
mealie_db_type: "sqlite" # sqlite или postgres
mealie_db_type: "sqlite"
mealie_db_password: "secure_password_123"
# Bitwarden variables
bitwarden_base_dir: "/mnt/bitwarden"
bitwarden_data_dir: "{{ bitwarden_base_dir }}/vw-data"
bitwarden_port: "45131"
bitwarden_admin_token: "QMhEngkv2a5s5S1AOp96A7rxiwz9BTCHGORY3EHcUYEP9wy07/+HxYGimL/FQAwl"
bitwarden_websocket_enabled: true
bitwarden_signups_allowed: false
bitwarden_smtp_host: "smtp.mail.ru"
bitwarden_smtp_port: "465"
bitwarden_smtp_ssl: true
bitwarden_smtp_username: "zailon@bk.ru"
bitwarden_smtp_password: "khhyw8Ri9WrabwqM2vbC"
bitwarden_smtp_from: "zailon@bk.ru"
bitwarden_domain: "https://bw.zailon.ru"
# Media services base directories
service_config_base: "/mnt/service"

View File

@ -3,10 +3,6 @@
roles:
- {role: base_setup, tags: deploy_base }
- hosts: all
roles:
- { role: base_setup, tags: deploy_base }
- hosts: gateway
roles:
- { role: docker, tags: deploy_docker }
@ -18,7 +14,7 @@
- { role: docker, tags: deploy_docker }
- { role: mealie, tags: deploy_mealie }
- { role: bookstack, tags: deploy_bookstack }
- { role: bitwarden, tags: deploy_bitwarden }
- hosts: media
roles:
- { role: docker, tags: deploy_docker }

View File

@ -0,0 +1,35 @@
---
- name: Create Bitwarden directories
file:
path: "{{ item }}"
state: directory
mode: 0755
loop:
- "{{ bitwarden_base_dir }}"
- "{{ bitwarden_data_dir }}"
- name: Deploy Bitwarden docker-compose.yml
template:
src: docker-compose.yml.j2
dest: "{{ bitwarden_base_dir }}/docker-compose.yml"
mode: 0644
- name: Start Bitwarden services
shell: |
cd {{ bitwarden_base_dir }}
docker compose up -d
args:
executable: /bin/bash
- name: Wait for services to start
pause:
seconds: 15
- name: Check Bitwarden container status
shell: docker ps --filter name=vaultwarden
register: bitwarden_status
changed_when: false
- name: Show Bitwarden status
debug:
var: bitwarden_status.stdout

View File

@ -0,0 +1,21 @@
version: '3.5'
services:
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: unless-stopped
ports:
- "{{ bitwarden_port }}:80"
volumes:
- "{{ bitwarden_data_dir }}:/data/"
environment:
- ADMIN_TOKEN={{ bitwarden_admin_token }}
- WEBSOCKET_ENABLED={{ bitwarden_websocket_enabled | default('true') }}
- SIGNUPS_ALLOWED={{ bitwarden_signups_allowed | default('false') }}
- SMTP_HOST={{ bitwarden_smtp_host }}
- SMTP_PORT={{ bitwarden_smtp_port }}
- SMTP_SSL={{ bitwarden_smtp_ssl | default('true') }}
- SMTP_USERNAME={{ bitwarden_smtp_username }}
- SMTP_PASSWORD={{ bitwarden_smtp_password }}
- SMTP_FROM={{ bitwarden_smtp_from }}
- DOMAIN={{ bitwarden_domain }}