summaryrefslogtreecommitdiffstats
path: root/lavalab-gen.py
diff options
context:
space:
mode:
Diffstat (limited to 'lavalab-gen.py')
-rwxr-xr-xlavalab-gen.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py
index 6c1cb0f..49203ec 100755
--- a/lavalab-gen.py
+++ b/lavalab-gen.py
@@ -97,11 +97,12 @@ def main(args):
fp = open("lavalab-udev-%s.rules" % lab_name, "w")
fp.write(udev_line)
fp.close()
- if not os.path.isdir("lava-master/slaves/"):
- os.mkdir("lava-master/slaves/")
- fp = open("lava-master/slaves/%s.yaml" % lab_name, "w")
- fp.write("dispatcher_ip: 192.168.66.1")
- fp.close()
+ if lab.has_key("dispatcher_ip"):
+ if not os.path.isdir("lava-master/slaves/"):
+ os.mkdir("lava-master/slaves/")
+ fp = open("lava-master/slaves/%s.yaml" % lab_name, "w")
+ fp.write("dispatcher_ip: %s" % lab["dispatcher_ip"])
+ fp.close()
#now proceed with tokens
fp = open(tokens_yaml, "r")