Use knife to create a new recipe in a cookbook

John Wyatt picture John Wyatt · Oct 3, 2013 · Viewed 7.2k times · Source

I've used knife solo to create a new folder and a cookbook with a default recipe using a custom template defined by .chef/knife.rb. My question is what command do I use for knife to create new recipes with that template instead of using cp?

Something like knife cookbook addrecipe somerecipe

Answer

slayedbylucifer picture slayedbylucifer · Oct 3, 2013

once you have the cookbook created, then there will be recipe folder inside the cookbook . you can go on writing as many recipes as you want inside the recipes folder. AFAIK, knife cookbook does not provide any option for creating a new recipe. check knife cookbook --help