feat: support for cert based authentication

This commit is contained in:
2023-05-28 17:25:25 +02:00
parent 7567dbaa4b
commit 09c37b2a65
5 changed files with 35 additions and 1 deletions

View File

@@ -63,9 +63,12 @@ def dump_config(vmList, masterAddress):
with open("/etc/nginx/nginx.conf", "w") as f:
with open("./config/nginx.json") as j:
nginxJson = json.load(j)
env = jinja2.Environment(loader=jinja2.FileSystemLoader(searchpath="./templates"))
template = env.get_template("nginx.conf.j2")
mapsTemplate = env.get_template("nginx_maps.j2")
nginxJson["maps"] = mapsTemplate.render()
content = template.render(nginxJson)
f.write(content)