Skip to content

Instantly share code, notes, and snippets.

@iafonov
Created August 14, 2012 13:07
Show Gist options
  • Save iafonov/3349101 to your computer and use it in GitHub Desktop.
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 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)

@erikh
Copy link

erikh commented Aug 14, 2012

I wrote a small ERB templating system that integrates with highline to ask questions: https://github.com/erikh/askerb

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