8a7a4c0889
- ACME TLS challenge on 443 (no port 80 or nginx decoy) - Auto-generate and persist obfs password per server - Update client export, HTML catalog, and vault examples - Document Salamander vs main and ACME auto-renewal in README Co-authored-by: Cursor <cursoragent@cursor.com>
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
---
|
||
- name: Stop and disable hysteria-server
|
||
ansible.builtin.systemd:
|
||
name: "{{ hysteria2_service_name }}"
|
||
enabled: false
|
||
state: stopped
|
||
failed_when: false
|
||
|
||
- name: Remove Hysteria2 via official script
|
||
ansible.builtin.shell:
|
||
cmd: bash <(curl -fsSL https://get.hy2.sh/) --remove
|
||
executable: /bin/bash
|
||
register: _hysteria2_remove
|
||
failed_when: false
|
||
|
||
- name: Remove Hysteria2 configuration directory
|
||
ansible.builtin.file:
|
||
path: "{{ hysteria2_config_path | dirname }}"
|
||
state: absent
|
||
when: hysteria2_uninstall_remove_config | bool
|
||
|
||
- name: Reload systemd after uninstall
|
||
ansible.builtin.systemd:
|
||
daemon_reload: true
|
||
|
||
- name: Show uninstall result
|
||
ansible.builtin.debug:
|
||
msg: >-
|
||
Hysteria2 (Salamander) удалён с {{ inventory_hostname }}.
|
||
{% if not hysteria2_uninstall_remove_local_output | bool %}
|
||
Локальные URL/QR в {{ hysteria2_output_dir }}/{{ hysteria2_output_name }}/ сохранены.
|
||
{% endif %}
|
||
|
||
- name: Remove local exported client files
|
||
ansible.builtin.file:
|
||
path: "{{ hysteria2_output_dir }}/{{ hysteria2_output_name }}"
|
||
state: absent
|
||
delegate_to: localhost
|
||
become: false
|
||
when: hysteria2_uninstall_remove_local_output | bool
|