Files
hysteria2/roles/hysteria2/tasks/uninstall.yml
T
Sergey Antropoff 8a7a4c0889 Add Salamander obfs branch: replace masquerade with packet obfuscation.
- 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>
2026-07-01 02:17:22 +03:00

41 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
- 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