Code review comment for lp:~avishai-ish-shalom/cloud-init/chef

Revision history for this message
Mike Moulton (mmoulton) wrote :

I was able to get this to work with the following patch to cc_chef.py:

root@ip-10-168-67-228:~# diff /usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/cc_chef.py /tmp/cc_chef.py
35c35
< install_type = cfg.get_cfg_option_str("install_type", "packages")
---
> install_type = util.get_cfg_option_str(chef_cfg, "install_type", "packages")
37c37
< if install_type = "gems":
---
> if install_type == "gems":
65,66c65,66
< firstboot_json_fh.write(runlist_item + "\n")
< firstboot_json_fh.write("]\n\}")
---
> firstboot_json_fh.write("\"" + runlist_item + "\"\n")
> firstboot_json_fh.write("]\n}")

Can either Scott or Avishai apply this?

I will create a bug as requested with the user data I used to get this to work. Please note, the user data will not be testable by others without their own valid chef server and validator key.

review: Needs Fixing

« Back to merge proposal