Merge pull request 'borgbackup/server: warning if a machine does not have a secret generated yet.' (#1775) from inventory-fixes into main

This commit is contained in:
clan-bot
2024-07-17 14:03:10 +00:00

View File

@@ -28,7 +28,13 @@ in
let let
fullPath = borgbackupIpMachinePath machine; fullPath = borgbackupIpMachinePath machine;
in in
if builtins.pathExists fullPath then machine else null if builtins.pathExists fullPath then
machine
else
lib.warn ''
Machine ${machine} does not have a borgbackup key at ${fullPath},
run `clan facts generate ${machine}` to generate it.
'' null
) allClients; ) allClients;
machinesWithKey = lib.filter (x: x != null) machinesMaybeKey; machinesWithKey = lib.filter (x: x != null) machinesMaybeKey;