Also load config settings from secrets.yaml
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1 +1,2 @@
|
|||||||
_secrets.yaml filter=git-crypt diff=git-crypt
|
_secrets.yaml filter=git-crypt diff=git-crypt
|
||||||
|
secrets.yaml filter=git-crypt diff=git-crypt
|
||||||
|
|||||||
@@ -2,3 +2,4 @@ PyYAML==6.0.3
|
|||||||
requests==2.32.5
|
requests==2.32.5
|
||||||
Jinja2==3.1.6
|
Jinja2==3.1.6
|
||||||
GitPython==3.1.45
|
GitPython==3.1.45
|
||||||
|
mergedeep==1.3.4
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import git
|
|||||||
import requests
|
import requests
|
||||||
import yaml
|
import yaml
|
||||||
from jinja2 import Environment, FileSystemLoader, StrictUndefined, Template
|
from jinja2 import Environment, FileSystemLoader, StrictUndefined, Template
|
||||||
|
from mergedeep import merge
|
||||||
|
|
||||||
REPO = git.Repo(sys.path[0], search_parent_directories=True)
|
REPO = git.Repo(sys.path[0], search_parent_directories=True)
|
||||||
assert REPO.working_dir is not None
|
assert REPO.working_dir is not None
|
||||||
@@ -134,6 +135,9 @@ def main():
|
|||||||
with open(ROOT.joinpath("config.yaml")) as fyaml:
|
with open(ROOT.joinpath("config.yaml")) as fyaml:
|
||||||
config = yaml.safe_load(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}
|
template_args = {"config": config, "root": ROOT}
|
||||||
|
|
||||||
nodes = []
|
nodes = []
|
||||||
|
|||||||
Reference in New Issue
Block a user