diff options
Diffstat (limited to 'cloudinit/CloudConfig/cc_chef.py')
-rw-r--r-- | cloudinit/CloudConfig/cc_chef.py | 5 |
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') |