fix: пересборка output/index.html при uninstall с LIMIT

Второй play перенесён на hysteria2_servers с run_once на localhost,
чтобы LIMIT не пропускал пересборку. Пустой index.html удаляется.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Sergey Antropoff
2026-07-01 13:31:28 +03:00
parent 13af9e814c
commit 56ccf6ed39
4 changed files with 24 additions and 11 deletions
+13 -8
View File
@@ -10,14 +10,19 @@
tasks_from: uninstall.yml
- name: Rebuild global output index after uninstall
hosts: localhost
connection: local
gather_facts: true
become: false
hosts: hysteria2_servers
gather_facts: false
tags: [uninstall]
tasks:
- name: Regenerate output/index.html from remaining servers
ansible.builtin.include_role:
name: hysteria2
tasks_from: export_global.yml
- name: Regenerate output/index.html without removed server
block:
- name: Run global export tasks
ansible.builtin.include_role:
name: hysteria2
tasks_from: export_global.yml
vars:
hysteria2_open_browser: false
run_once: true
delegate_to: localhost
become: false
when: hysteria2_uninstall_rebuild_global_index | default(true) | bool