Skip to content

Instantly share code, notes, and snippets.

Created August 14, 2012 13:07
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save iafonov/3349101 to your computer and use it in GitHub Desktop.
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 knife cookbook create ntpd --template

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. (

Copy link

fnichol commented Aug 14, 2012

This is a great idea! I feature I use a lot when creating Rails applications. Plus Thor has some nice functionality like prompting if a file already exists (overwrite, keep existing, show diff, etc.).

Copy link

erikh commented Aug 14, 2012

I wrote a small ERB templating system that integrates with highline to ask questions:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment