diff --git a/surok.py b/surok.py index 9d36561..ee60559 100755 --- a/surok.py +++ b/surok.py @@ -52,7 +52,9 @@ while 1: app_hosts = resolve(app_conf, conf) # Populate my dictionary - my = { "services": app_hosts } + my = { "services": app_hosts, + "conf_name": app_conf['conf_name'] + } service_conf = gen(my, app_conf['template']) diff --git a/surok/templates.py b/surok/templates.py index 8056af0..e504898 100644 --- a/surok/templates.py +++ b/surok/templates.py @@ -9,6 +9,7 @@ def gen(my, jj2): f.close() template = Template(temp) + os.environ['APP_NAME'] = my['conf_name'] my['env'] = os.environ return template.render(my=my)