Zerotier/constraints: small improvements

This commit is contained in:
Johannes Kirschbauer
2024-11-13 13:53:54 +01:00
parent 8a5d99f6d2
commit 527769e060
3 changed files with 6 additions and 4 deletions

View File

@@ -2,8 +2,10 @@
description = "Configures [Zerotier VPN](https://zerotier.com) secure and efficient networking within a Clan.."
features = [ "inventory" ]
constraints.roles.controller.eq = 1
constraints.roles.moon.max = 7
[constraints]
roles.controller.min = 1
roles.controller.max = 1
roles.moon.max = 7
---
## Overview

View File

@@ -48,7 +48,7 @@ in
# TODO: This should also be checked via frontmatter constraints
{
assertion = builtins.length instanceNames == 1;
message = "The zerotier module currently only supports one instance per machine, but found ${builtins.toString instanceNames}";
message = "The zerotier module currently only supports one instance per machine, but found ${builtins.toString instanceNames} on machine ${config.clan.core.machineName}";
}
];

View File

@@ -17,7 +17,7 @@
},
"services": {
"zerotier": {
"1": {
"one": {
"roles": {
"controller": {
"machines": ["test-inventory-machine"]