Files
hysteria2/roles/hysteria2/defaults/main.yml
T
Sergey Antropoff d61a26557a feat: bundle and sync official Hysteria2 install script locally
Store install_server.sh in role files, compare SHA256 with get.hy2.sh on the control node before install/update, refresh the bundled copy when upstream changes, then copy and run it on VPS.
2026-07-01 12:00:10 +03:00

49 lines
2.0 KiB
YAML

---
# Домен сервера (A-запись → IP VPS). Задаётся per-host в inventory.
hysteria2_domain: ""
# Email для ACME / Let's Encrypt
hysteria2_acme_email: ""
# Список имён пользователей VPN (пароли генерируются автоматически)
hysteria2_users: []
# Опционально: фиксированные пароли { username: password }
# Пустое значение или отсутствие ключа — автогенерация на control node (Ansible password lookup)
hysteria2_password_length: 40
hysteria2_listen_port: 443
hysteria2_upgrade_system: true
hysteria2_configure_firewall: true
hysteria2_masq_dir: /var/www/masq
hysteria2_config_path: /etc/hysteria/config.yaml
hysteria2_service_name: hysteria-server
# Официальный install_server.sh: хранится в roles/hysteria2/files/, синхронизируется с get.hy2.sh
hysteria2_install_script_url: "https://get.hy2.sh/"
hysteria2_install_script_name: install_server.sh
hysteria2_install_script_staging_dir: "{{ playbook_dir }}/.cache/hysteria2"
hysteria2_install_script_remote_path: /tmp/hysteria2-install_server.sh
# Локальный каталог для экспорта URL и QR (на control node)
hysteria2_output_dir: "{{ playbook_dir }}/output"
hysteria2_output_name: "{{ inventory_hostname }}"
# Генерировать PNG QR-коды через qrencode (apt на VPS, fetch на control node)
hysteria2_generate_qr_png: true
hysteria2_qr_png_size: 6
hysteria2_qr_png_margin: 2
hysteria2_qr_png_error_correction: M
# Ждать ACME при первом запуске (отключите при update: make update)
hysteria2_wait_for_acme: true
# Открыть output/index.html в браузере после install/update/export
hysteria2_open_browser: true
# --- uninstall ---
hysteria2_uninstall_remove_config: true
hysteria2_uninstall_remove_masq: true
hysteria2_uninstall_remove_local_output: false