added aim

This commit is contained in:
admin_rb
2026-09-15 18:54:22 +02:00
parent 343fe9b22f
commit 7c24c7ba7f
44 changed files with 4742 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
from __future__ import annotations
from pathlib import Path
class VariableViewer:
def __init__(self, customers):
self.customers = customers
def files(self, customer: str, kind: str) -> list[Path]:
if kind not in {"group_vars", "host_vars"}:
raise ValueError("Unsupported variable directory")
root = self.customers.require(customer) / kind
if not root.exists():
return []
return sorted(p for p in root.rglob("*.yml") if p.is_file())
def relative(self, customer: str, path: Path) -> Path:
return path.relative_to(self.customers.require(customer))