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.
This commit is contained in:
Sergey Antropoff
2026-07-01 13:19:47 +03:00
parent 8e7e5bd7fb
commit 0d67822eb8
4 changed files with 34 additions and 20 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ update: check ## Обновить бинарник, перекатить кон
export: check ## Только перевыпустить URL и QR (без изменений на сервере)
$(ANSIBLE) playbook.yml --tags export $(ANSIBLE_OPTS)
uninstall: ## Удалить Hysteria2 с VPS
uninstall: ## Полностью удалить Hysteria2 с VPS (только uninstall, без install/update)
@echo "$(YELLOW)Будет выполнено удаление Hysteria2$(NC) $(if $(LIMIT),на $(LIMIT),на всех серверах)"
@read -p "Продолжить? [y/N] " c; [[ "$$c" =~ ^[Yy]$$ ]] || exit 1
$(ANSIBLE) playbook-uninstall.yml --tags uninstall $(ANSIBLE_OPTS)