rewrite sops backend for secret generation and add tests
This commit is contained in:
9
pkgs/clan-cli/clan_cli/machines/facts.py
Normal file
9
pkgs/clan-cli/clan_cli/machines/facts.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from .folders import machine_folder
|
||||
|
||||
|
||||
def machine_has_fact(machine: str, fact: str) -> bool:
|
||||
return (machine_folder(machine) / "facts" / fact).exists()
|
||||
|
||||
|
||||
def machine_get_fact(machine: str, fact: str) -> str:
|
||||
return (machine_folder(machine) / "facts" / fact).read_text()
|
||||
Reference in New Issue
Block a user