Files
hysteria2/roles/hysteria2/tasks/update.yml
T
Sergey Antropoff b9e622e5c2 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:37 +03:00

20 lines
646 B
YAML

---
- name: Sync official Hysteria2 install script on control node
ansible.builtin.import_tasks: sync_install_script.yml
- name: Copy Hysteria2 install script to server
ansible.builtin.copy:
src: "{{ hysteria2_install_script_name }}"
dest: "{{ hysteria2_install_script_remote_path }}"
mode: "0755"
- name: Update Hysteria2 binary via official script
ansible.builtin.command:
cmd: "{{ hysteria2_install_script_remote_path }} --force"
register: _hysteria2_update
notify: Restart hysteria-server
- name: Show Hysteria2 update result
ansible.builtin.debug:
msg: "{{ _hysteria2_update.stdout_lines | default([]) }}"