Commit 7add591d authored by Kristopher Ruzic's avatar Kristopher Ruzic

write json to a more suitable directory

parent 771fbff3
......@@ -25,6 +25,7 @@ build["disk_type"] = '%(disk-type)s'
build["hostname"] = '%(packer-hostname)s'
build["domain"] = '%(packer-domain)s'
instance_dir = '%(instance-dir)s'
socket_path = '%(socket-path)s'
nbd_list = (('%(nbd-host)s', %(nbd-port)s), ('%(nbd2-host)s', %(nbd2-port)s))
disk_path = '%(disk-path)s'
......@@ -104,7 +105,7 @@ def getSocketStatus(host, port):
def gen_packer_json(build):
import json
packer_json = {"builders": [build]}
with open("packer.json", 'w') as outfile:
with open(instance_dir + "packer.json", 'w') as outfile:
json.dump(packer_json, outfile)
......
......@@ -78,6 +78,7 @@ recipe = slapos.cookbook:packer
vnc-passwd = $${gen-passwd:passwd}
instance-dir = ${buildout:directory}
ipv4 = $${slap-parameter:ipv4-random}
ipv6 = $${slap-parameter:ipv6-random}
vnc-ip = $${:ipv4}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment