fix: run only uninstall tasks, not full role on make uninstall

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>
This commit is contained in:
Sergey Antropoff
2026-07-01 13:19:47 +03:00
parent f5939c48fc
commit 5d0d3e49a0
4 changed files with 31 additions and 19 deletions
+6 -3
View File
@@ -2,9 +2,12 @@
- name: Uninstall Hysteria2 servers
hosts: hysteria2_servers
gather_facts: false
roles:
- role: hysteria2
tags: [uninstall]
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