我使用刀具独奏使用.chef/knife.rb定义的自定义模板创建一个新文件夹和一个带有默认配方的食谱.我的问题是我使用什么命令刀来创建使用该模板而不是使用cp的新配方?
就像是 knife cookbook addrecipe somerecipe
一旦你创建了食谱,那么食谱中就会有食谱文件夹.您可以在食谱文件夹中继续编写任意数量的食谱.AFAIK,knife cookbook不提供创建新配方的任何选项.校验knife cookbook --help
您可以使用厨师而非刀来创建食谱。
chef generate recipe cookbooks/test_cookbook new_recipe
Compiling Cookbooks...Recipe: code_generator::recipe[...]
- create new file cookbooks/test_cookbook new_recipe.rb
- update content in file cookbooks/test_cookbook new_recipe.rb from none to 8602b0 (diff output suppressed by config)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6714 次 |
| 最近记录: |