vars,facts: add sops.defaultGroups to new machines
Prior to this, when initializing new machines, only the current user had access to it's key which prevents other admin users to deploy this machine later
This commit is contained in:
@@ -28,6 +28,7 @@ class SecretStore(SecretStoreBase):
|
||||
sops_secrets_folder(self.machine.flake_dir)
|
||||
/ f"{self.machine.name}-age.key",
|
||||
priv_key,
|
||||
add_groups=self.machine.deployment["sops"]["defaultGroups"],
|
||||
)
|
||||
add_machine(self.machine.flake_dir, self.machine.name, pub_key, False)
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ class SecretStore(SecretStoreBase):
|
||||
sops_secrets_folder(self.machine.flake_dir)
|
||||
/ f"{self.machine.name}-age.key",
|
||||
priv_key,
|
||||
add_groups=self.machine.deployment["sops"]["defaultGroups"],
|
||||
)
|
||||
add_machine(self.machine.flake_dir, self.machine.name, pub_key, False)
|
||||
|
||||
|
||||
@@ -159,6 +159,7 @@ def test_generate_secret_var_sops(
|
||||
)
|
||||
|
||||
|
||||
# TODO: it doesn't actually test if the group has access
|
||||
@pytest.mark.impure
|
||||
def test_generate_secret_var_sops_with_default_group(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
|
||||
Reference in New Issue
Block a user