Also load config settings from secrets.yaml

This commit is contained in:
2025-11-11 03:45:10 +01:00
parent c121533161
commit 2dda3cc465
3 changed files with 6 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -1 +1,2 @@
_secrets.yaml filter=git-crypt diff=git-crypt
secrets.yaml filter=git-crypt diff=git-crypt

View File

@@ -2,3 +2,4 @@ PyYAML==6.0.3
requests==2.32.5
Jinja2==3.1.6
GitPython==3.1.45
mergedeep==1.3.4

View File

@@ -11,6 +11,7 @@ import git
import requests
import yaml
from jinja2 import Environment, FileSystemLoader, StrictUndefined, Template
from mergedeep import merge
REPO = git.Repo(sys.path[0], search_parent_directories=True)
assert REPO.working_dir is not None
@@ -134,6 +135,9 @@ def main():
with open(ROOT.joinpath("config.yaml")) as fyaml:
config = yaml.safe_load(fyaml)
with open(ROOT.joinpath("secrets.yaml")) as fyaml:
merge(config, yaml.safe_load(fyaml))
template_args = {"config": config, "root": ROOT}
nodes = []