Merge pull request 'cli vars password-store: fix file locations' (#2410) from lassulus/clan-core:vars-pass into main
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
lib.mkIf (config.clan.core.vars.settings.secretStore == "password-store")
|
lib.mkIf (config.clan.core.vars.settings.secretStore == "password-store")
|
||||||
{
|
{
|
||||||
fileModule = file: {
|
fileModule = file: {
|
||||||
path = lib.mkIf file.config.secret "${config.clan.core.password-store.targetDirectory}/${config.clan.core.machineName}-${file.config.generatorName}-${file.config.name}";
|
path = lib.mkIf file.config.secret "${config.clan.core.vars.settings.secretUploadDirectory}/vars/${file.config.generatorName}/${file.config.name}";
|
||||||
};
|
};
|
||||||
secretUploadDirectory = lib.mkDefault "/etc/secrets";
|
secretUploadDirectory = lib.mkDefault "/etc/secrets";
|
||||||
secretModule = "clan_cli.vars.secret_modules.password_store";
|
secretModule = "clan_cli.vars.secret_modules.password_store";
|
||||||
|
|||||||
@@ -142,13 +142,7 @@ class SecretStore(SecretStoreBase):
|
|||||||
for secret_var in self.get_all():
|
for secret_var in self.get_all():
|
||||||
if not secret_var.deployed:
|
if not secret_var.deployed:
|
||||||
continue
|
continue
|
||||||
if secret_var.shared:
|
output_file = output_dir / "vars" / secret_var.generator / secret_var.name
|
||||||
output_file = (
|
|
||||||
output_dir / "shared" / secret_var.generator / secret_var.name
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
output_file = output_dir / secret_var.generator / secret_var.name
|
|
||||||
|
|
||||||
output_file.parent.mkdir(parents=True, exist_ok=True)
|
output_file.parent.mkdir(parents=True, exist_ok=True)
|
||||||
with (output_file).open("wb") as f:
|
with (output_file).open("wb") as f:
|
||||||
f.write(
|
f.write(
|
||||||
|
|||||||
Reference in New Issue
Block a user