Fix: regression list_machines. Split into multiple functions

list_inventory_machines, list_nixos_machine, list_sops_machines
The caller of the function should specify which machines they wants to see
This commit is contained in:
Johannes Kirschbauer
2024-08-03 12:32:37 +02:00
parent 79e15bff24
commit 91397adbfc
7 changed files with 19 additions and 11 deletions

View File

@@ -13,7 +13,9 @@ log = logging.getLogger(__name__)
@API.register
def list_machines(flake_url: str | Path, debug: bool = False) -> dict[str, Machine]:
def list_inventory_machines(
flake_url: str | Path, debug: bool = False
) -> dict[str, Machine]:
inventory = load_inventory_eval(flake_url)
return inventory.machines