From be50f16913d2877a6695c8b25d36313a13b255c0 Mon Sep 17 00:00:00 2001 From: Corentin LABBE Date: Wed, 18 Jul 2018 14:40:37 +0200 Subject: Permit to choose the FQDN printed in email --- lavalab-gen.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lavalab-gen.py') diff --git a/lavalab-gen.py b/lavalab-gen.py index f7f06f3..4c10109 100755 --- a/lavalab-gen.py +++ b/lavalab-gen.py @@ -87,7 +87,7 @@ def main(): sys.exit(1) masters = workers["masters"] for master in masters: - keywords_master = [ "name", "type", "host", "users", "tokens", "webadmin_https", "persistent_db", "zmq_auth", "zmq_auth_key", "zmq_auth_key_secret" ] + keywords_master = [ "name", "type", "host", "users", "tokens", "webadmin_https", "persistent_db", "zmq_auth", "zmq_auth_key", "zmq_auth_key_secret", "http_fqdn" ] for keyword in master: if not keyword in keywords_master: print("WARNING: unknown keyword %s" % keyword) @@ -138,6 +138,13 @@ def main(): else: cookie_secure = "false" session_cookie_secure = "false" + if "http_fqdn" in worker: + lava_http_fqdn = worker["http_fqdn"] + else: + lava_http_fqdn = "example.com" + f_fqdn = open("%s/lava_http_fqdn" % workerdir, 'w') + f_fqdn.write(lava_http_fqdn) + f_fqdn.close() fsettings = open("%s/settings.conf" % workerdir, 'w') fsettings.write(template_settings_conf.substitute(cookie_secure=cookie_secure, session_cookie_secure=session_cookie_secure)) fsettings.close() -- cgit 1.2.3-korg