Add per-node action groups with schedules, runs, and logs.

Let operators manage ordered action groups on each host, run them manually or on a schedule over SSH, and inspect disk-backed JSON run logs from a node detail UI.
This commit is contained in:
2026-07-19 20:01:11 +02:00
parent 50568127c5
commit 32af91fd30
22 changed files with 4337 additions and 32 deletions
@@ -0,0 +1,18 @@
package auth
import "testing"
func TestExpandPlaceholders(t *testing.T) {
body := "ping {{node.ip}} as {{node.username}} host={{cc.host}} env={{env.FOO}} secret={{secret.TOKEN}} unknown={{nope}}"
got := ExpandPlaceholders(body, PlaceholderContext{
Host: "web-1",
IP: "10.0.0.5",
Username: "deploy",
Env: map[string]string{"FOO": "bar"},
Secrets: map[string]string{},
})
want := "ping 10.0.0.5 as deploy host=web-1 env=bar secret= unknown="
if got != want {
t.Fatalf("got %q want %q", got, want)
}
}