fix: пересборка output/index.html при uninstall с LIMIT
Второй play перенесён на hysteria2_servers с run_once на localhost, чтобы LIMIT не пропускал пересборку. Пустой index.html удаляется.
This commit is contained in:
@@ -56,6 +56,13 @@
|
||||
when: hysteria2_global_servers | default([]) | length > 0
|
||||
become: false
|
||||
|
||||
- name: Remove global HTML index when no servers remain
|
||||
ansible.builtin.file:
|
||||
path: "{{ hysteria2_output_dir }}/index.html"
|
||||
state: absent
|
||||
when: hysteria2_global_servers | default([]) | length == 0
|
||||
become: false
|
||||
|
||||
- name: Open global index in default browser (macOS)
|
||||
ansible.builtin.command:
|
||||
cmd: open "{{ hysteria2_output_dir }}/index.html"
|
||||
@@ -87,6 +94,6 @@
|
||||
|
||||
- name: Skip global index when no servers exported
|
||||
ansible.builtin.debug:
|
||||
msg: "Глобальный index.html не создан — нет server-info.yml в {{ hysteria2_output_dir }}/"
|
||||
msg: "Глобальный {{ hysteria2_output_dir }}/index.html удалён — нет server-info.yml в output/"
|
||||
when: hysteria2_global_servers | default([]) | length == 0
|
||||
become: false
|
||||
|
||||
@@ -127,5 +127,5 @@
|
||||
Hysteria2 (Salamander) полностью удалён с {{ inventory_hostname }}.
|
||||
Локальная папка {{ hysteria2_output_dir }}/{{ hysteria2_output_name }}/ удалена.
|
||||
{% if hysteria2_uninstall_rebuild_global_index | default(true) | bool %}
|
||||
Глобальный {{ hysteria2_output_dir }}/index.html будет пересобран.
|
||||
{{ hysteria2_output_dir }}/index.html будет пересобран без этого сервера.
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user