double-z
8/14/2012 - 1:07 PM

Chef git templates

Chef git templates

Chef git templates

Chef should allow creating cookbooks and chef-repo using templates. It should maintain the ability to create artifacts offline but a special switch could be supplied to knife wich will tell it to clone the remote repository rather than create a hardcoded structure.

Use cases:

knife chef-repo create --template https://github.com/fnichol/chef-bootstrap-repo knife cookbook create ntpd --template https://github.com/test/cookbook-with-minitest-and-berkshelf

Basically knife should clone the repository into folder and remove .git directory.

The idea could be pushed to 11 by following the same implementation as rails uses. (http://edgeguides.rubyonrails.org/rails_application_templates.html)