27ae65edc5
Tagging the whole role with uninstall caused install/configure/update/export to run first. Use include_role tasks_from uninstall.yml; add safe defaults for uninstall variables. Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
655 B
YAML
24 lines
655 B
YAML
---
|
|
- name: Uninstall Hysteria2 servers
|
|
hosts: hysteria2_servers
|
|
gather_facts: false
|
|
tags: [uninstall]
|
|
tasks:
|
|
- name: Run Hysteria2 uninstall tasks only
|
|
ansible.builtin.include_role:
|
|
name: hysteria2
|
|
tasks_from: uninstall.yml
|
|
|
|
- name: Rebuild global output index after uninstall
|
|
hosts: localhost
|
|
connection: local
|
|
gather_facts: true
|
|
become: false
|
|
tags: [uninstall]
|
|
tasks:
|
|
- name: Regenerate output/index.html from remaining servers
|
|
ansible.builtin.include_role:
|
|
name: hysteria2
|
|
tasks_from: export_global.yml
|
|
when: hysteria2_uninstall_rebuild_global_index | default(true) | bool
|