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.
This commit is contained in:
@@ -23,11 +23,18 @@
|
||||
+ (['qrencode'] if hysteria2_generate_qr_png | bool else [])
|
||||
}}
|
||||
|
||||
- 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: Install Hysteria2 via official script
|
||||
ansible.builtin.shell:
|
||||
cmd: bash <(curl -fsSL https://get.hy2.sh/)
|
||||
executable: /bin/bash
|
||||
args:
|
||||
ansible.builtin.command:
|
||||
cmd: "{{ hysteria2_install_script_remote_path }}"
|
||||
creates: /usr/local/bin/hysteria
|
||||
register: _hysteria2_install
|
||||
|
||||
|
||||
Reference in New Issue
Block a user