APP_NAME env

This commit is contained in:
Difrex 2016-08-04 13:16:06 +03:00
parent 4c8acc6bc8
commit 04023b63d2
2 changed files with 4 additions and 1 deletions

View File

@ -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'])

View File

@ -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)