summaryrefslogtreecommitdiffstats
path: root/lavalab-gen.py
diff options
context:
space:
mode:
Diffstat (limited to 'lavalab-gen.py')
-rwxr-xr-xlavalab-gen.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py
index 521deda..fbe2df9 100755
--- a/lavalab-gen.py
+++ b/lavalab-gen.py
@@ -121,7 +121,7 @@ def main():
"healthcheck_url", "host", "http_fqdn",
"loglevel", "lava-coordinator",
"name",
- "persistent_db",
+ "persistent_db", "pg_lava_password",
"slave_keys", "slaveenv", "smtp",
"tokens", "type",
"users",
@@ -172,6 +172,13 @@ def main():
groupdir = "%s/groups" % workerdir
os.mkdir(groupdir)
worker = master
+ if "pg_lava_password" in master:
+ f_pg = open("%s/pg_lava_password" % workerdir, 'w')
+ f_pg.write(master["pg_lava_password"])
+ f_pg.close()
+ else:
+ f_pg = open("%s/pg_lava_password" % workerdir, 'w')
+ f_pg.close()
if "version" in worker:
dockerfile = open("%s/Dockerfile" % workerdir, "r+")
dockerfilec = re.sub('(^FROM.*:).*', '\g<1>%s' % worker["version"], dockerfile.read())