summaryrefslogtreecommitdiff
path: root/cloudinit/CloudConfig
diff options
context:
space:
mode:
authorAvishai Ish-Shalom <avishai.ish-shalom@mail.huji.ac.il>2011-09-09 01:32:39 +0300
committerAvishai Ish-Shalom <avishai.ish-shalom@mail.huji.ac.il>2011-09-09 01:32:39 +0300
commit57cf3d3da5d04c46034b8291e71175919c0e2f21 (patch)
tree78eb9c067f7a4066e846f4bc084492885766a53e /cloudinit/CloudConfig
parent0921f665ed0085ead8e3335acd79c7eadf761363 (diff)
downloadvyos-cloud-init-57cf3d3da5d04c46034b8291e71175919c0e2f21.tar.gz
vyos-cloud-init-57cf3d3da5d04c46034b8291e71175919c0e2f21.zip
Fixed wrong firstboot json format
Diffstat (limited to 'cloudinit/CloudConfig')
-rw-r--r--cloudinit/CloudConfig/cc_chef.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cloudinit/CloudConfig/cc_chef.py b/cloudinit/CloudConfig/cc_chef.py
index 10f3a67a..8b2cfc2a 100644
--- a/cloudinit/CloudConfig/cc_chef.py
+++ b/cloudinit/CloudConfig/cc_chef.py
@@ -58,8 +58,9 @@ def handle(name,cfg,cloud,log,args):
if chef_cfg.has_key('run_list'):
with open('/etc/chef/firstboot.json', 'w') as firstboot_json_fh:
firstboot_json_fh.write("{\n\"run_list\":\n[\n")
- for runlist_item in chef_cfg['run_list']:
- firstboot_json_fh.write(runlist_item + "\n")
+ firstboot_json_fh.write(
+ ",\n".join(["\"%s\"" % runlist_item for runlist_item in chef_cfg['run_list']])
+ )
firstboot_json_fh.write("]\n\}")
chef_args.append('-j /etc/chef/firstboot.json')