diff options
author | Scott Moser <smoser@ubuntu.com> | 2011-09-08 16:10:17 -0700 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2011-09-08 16:10:17 -0700 |
commit | 83ca15c56b4bb86dae1ef4065087c5efc89ecaed (patch) | |
tree | b2bc711602563097277352040251f78b8130ecda /cloudinit/CloudConfig/cc_chef.py | |
parent | abd818886f418f109046f41c285b588869e4bd95 (diff) | |
parent | 57cf3d3da5d04c46034b8291e71175919c0e2f21 (diff) | |
download | vyos-cloud-init-83ca15c56b4bb86dae1ef4065087c5efc89ecaed.tar.gz vyos-cloud-init-83ca15c56b4bb86dae1ef4065087c5efc89ecaed.zip |
Fix minor issue with multiple runlist items not written in the correct format.
Diffstat (limited to 'cloudinit/CloudConfig/cc_chef.py')
-rw-r--r-- | cloudinit/CloudConfig/cc_chef.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cloudinit/CloudConfig/cc_chef.py b/cloudinit/CloudConfig/cc_chef.py index cbf92ee7..5f13c77d 100644 --- a/cloudinit/CloudConfig/cc_chef.py +++ b/cloudinit/CloudConfig/cc_chef.py @@ -61,10 +61,10 @@ 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}") - + 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') # and finally, run chef |