mitchellh/packer — pull request #167 by jvandyke (2013-07-11 15:03:43+00:00)
Title: Provisioner for Chef Solo

A first pass at a provisioner plugin using Chef Solo.

**Configuration**

````json
{
"type": "chef-solo",
"cookbooks_paths": ["cookbooks", "site-cookbooks"],
"recipes": ["apt"],
"json": { ... },
"prevent_sudo": false,
"skip_install": false
}
````

`cookbooks_paths`: Local cookbook paths to be uploaded to server. Relative to configuration file or absolute.
`recipes`: Recipes to run on the machine. This option will override the `run_list` option inside the `json` attributes, so define your run list there if you have non-recipes to add.
`json`: Attributes to include in the node. This will be passed to the chef-solo run.
`prevent_sudo`: Prevents sudo from being used for commands. Default: false.
`skip_install`: Skips automatic installation of Chef using the omnibus installer for linux. Default: false.

**Things of note**

- Tests are currently very minimal. Most needed tests involve verifying that functions are called or files are built correctly. I'm too new to Go to do this efficiently and within the time I have. *I could use some help here.*
- I only ran this provisioner on AWS using an Ubuntu AMI. Further manual testing for other builders is warranted.
- While there are options to avoid sudo usage and skip automatic Chef Solo installation, it would be nice to confirm that this works on a variety of operating systems.
- I'm new to Go, so any help in making my code more idomatic/better would be appreciated.
- There is no documentation written. I though Mitchell might want to take care of that himself, so I wasn't going to bother unless asked to. @mitchellh, let me know.