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.." description = "Configures [Zerotier VPN](https://zerotier.com) secure and efficient networking within a Clan.."
features = [ "inventory" ] features = [ "inventory" ]
constraints.roles.controller.eq = 1 [constraints]
constraints.roles.moon.max = 7 roles.controller.min = 1
roles.controller.max = 1
roles.moon.max = 7
--- ---
## Overview ## Overview

View File

@@ -48,7 +48,7 @@ in
# TODO: This should also be checked via frontmatter constraints # TODO: This should also be checked via frontmatter constraints
{ {
assertion = builtins.length instanceNames == 1; 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": { "services": {
"zerotier": { "zerotier": {
"1": { "one": {
"roles": { "roles": {
"controller": { "controller": {
"machines": ["test-inventory-machine"] "machines": ["test-inventory-machine"]