From 57cf3d3da5d04c46034b8291e71175919c0e2f21 Mon Sep 17 00:00:00 2001 From: Avishai Ish-Shalom Date: Fri, 9 Sep 2011 01:32:39 +0300 Subject: Fixed wrong firstboot json format --- cloudinit/CloudConfig/cc_chef.py | 5 +++-- 1 file 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') -- cgit v1.2.3