Nic*_*nto 4 ruby cookbook chef-infra chef-recipe
我有食谱base和食谱myapp
基地有2个食谱 - my_java和java_with_custom_stuff
在java_with_custom_stuff我想要使用食谱my_java(相同的食谱).就像是
include_recipe 'my_java'
bash 'custom stuff' do
...
end
Run Code Online (Sandbox Code Playgroud)
在myapp我做
include_recipe "base::java_with_custom_stuff"
但它抱怨它找不到 my_java
有没有办法使用同一食谱中的食谱?
slo*_*k2k 10
include_recipe每次使用第一部分作为烹饪书名称.所以你必须指定食谱 - 名称+食谱名称:
include_recipe '::my_java' # works still after you rename your cookbook
include_recipe 'base::my_java' # works only as long as your cookbook name is base
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3099 次 |
| 最近记录: |