APP_NAME env
This commit is contained in:
parent
4c8acc6bc8
commit
04023b63d2
4
surok.py
4
surok.py
@ -52,7 +52,9 @@ while 1:
|
|||||||
app_hosts = resolve(app_conf, conf)
|
app_hosts = resolve(app_conf, conf)
|
||||||
|
|
||||||
# Populate my dictionary
|
# Populate my dictionary
|
||||||
my = { "services": app_hosts }
|
my = { "services": app_hosts,
|
||||||
|
"conf_name": app_conf['conf_name']
|
||||||
|
}
|
||||||
|
|
||||||
service_conf = gen(my, app_conf['template'])
|
service_conf = gen(my, app_conf['template'])
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ def gen(my, jj2):
|
|||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
template = Template(temp)
|
template = Template(temp)
|
||||||
|
os.environ['APP_NAME'] = my['conf_name']
|
||||||
my['env'] = os.environ
|
my['env'] = os.environ
|
||||||
|
|
||||||
return template.render(my=my)
|
return template.render(my=my)
|
||||||
|
Loading…
Reference in New Issue
Block a user