Inventory: docs improvements

This commit is contained in:
Johannes Kirschbauer
2024-09-16 13:19:50 +02:00
parent ff9adee375
commit 56b76f9827
29 changed files with 237 additions and 195 deletions

View File

@@ -1,37 +1,8 @@
{ inventory, clan-core, ... }:
let
inherit (inventory) buildInventory getAllMachines;
inherit (inventory) buildInventory;
in
{
test_get_all_used_machines = {
# Test that all machines are returned
expr = getAllMachines {
machines = {
machine_3 = {
tags = [ "tag_3" ];
};
};
services = {
borgbackup.instance_1 = {
roles.server.machines = [ "backup_server" ];
roles.client.machines = [
"client_1_machine"
"client_2_machine"
];
roles.client.tags = [ "tag_3" ];
};
};
};
expected = {
backup_server = { };
client_1_machine = { };
client_2_machine = { };
machine_3 = {
tags = [ "tag_3" ];
};
};
};
test_inventory_empty = {
# Empty inventory should return an empty module
expr = buildInventory {