f6a81929b5
Второй play перенесён на hysteria2_servers с run_once на localhost, чтобы LIMIT не пропускал пересборку. Пустой index.html удаляется.
29 lines
813 B
YAML
29 lines
813 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: hysteria2_servers
|
|
gather_facts: false
|
|
tags: [uninstall]
|
|
tasks:
|
|
- 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
|