refactor(remnawave): синхронизировать панель из desired.yml и шаблонов команд
ansible-deploy / plan (push) Successful in 1s
ansible-lint / lint (push) Successful in 2s
ansible-deploy / deploy (core-mon, ) (push) Successful in 37s
ansible-deploy / deploy (core-net, ) (push) Failing after 52s
ansible-deploy / deploy (core-secrets, ) (push) Successful in 24s
ansible-deploy / deploy (ger-nod-02, ) (push) Successful in 1m20s
ansible-deploy / deploy (opnsense, ) (push) Successful in 13s
ansible-deploy / deploy (rus-central, ) (push) Successful in 1m6s

Повторный прогон без смены compose не тянет образы, ноды и сквады добавляются данными, а не новым плейбуком на каждый VPS.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
karpenokandCursor committed 2026-11-18 17:18:49 +07:00
1 parent 89f928c64a
commit 99ee815213
22 files changed
+1151 -672

No files matched your search

+23 -1
View File
@@ -9,7 +9,7 @@ import subprocess
import sys
from pathlib import Path
SKIP_PLAYBOOKS = {"site", "host", "core-git"}
SKIP_PLAYBOOKS = {"site", "host", "core-git", "remnanodes"}
def list_machines(playbooks_dir: Path) -> list[str]:
@@ -21,6 +21,25 @@ def list_machines(playbooks_dir: Path) -> list[str]:
return machines
def remnanode_hosts(inventory: Path) -> list[str]:
hosts: list[str] = []
in_group = False
for line in inventory.read_text(encoding="utf-8").splitlines():
if not in_group:
if line.startswith(" remnanodes:"):
in_group = True
continue
if not line.strip() or line.lstrip().startswith("#"):
continue
indent = len(line) - len(line.lstrip(" "))
if indent <= 4:
break
stripped = line.strip()
if indent >= 8 and stripped.endswith(":") and stripped != "hosts:":
hosts.append(stripped[:-1])
return hosts
def main() -> int:
event = os.environ.get("EVENT_NAME", "push").strip()
before = os.environ.get("EVENT_BEFORE", "").strip()
@@ -30,6 +49,9 @@ def main() -> int:
root = Path(__file__).resolve().parents[2]
machines = list_machines(root / "ansible" / "playbooks")
for host in remnanode_hosts(root / "ansible" / "inventories" / "prod" / "hosts.yml"):
if host not in machines:
machines.append(host)
include: list[dict[str, str]] = []
if event == "workflow_dispatch":