fix: update taskfiles and validation logic (#1264)

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl authored and GitHub committed 2024-01-26 20:34:04 -05:00
1 parent 3b0fcb7ba5
commit 7fc4250ef2
8 files changed
+44 -40

No files matched your search

+1 -1
View File
@@ -60,7 +60,7 @@ def _validate_node(node: dict, node_cidr: str, distribution: str) -> None:
raise ValueError(f"A node is missing a name")
if not node.get("ssh", {}).get("username") and distribution in ["k0s", "k3s"]:
raise ValueError(f"Node {node.get('name')} is missing a SSH username")
if not node.get("disk_device") and distribution in ["talos"]:
if not node.get("talos", {}).get("disk_device") and distribution in ["talos"]:
raise ValueError(f"Node {node.get('name')} is missing a disk device")
if not re.match(r"^[a-z0-9-\.]+$", node.get('name')):
raise ValueError(f"Node {node.get('name')} has an invalid name")