我有菜谱和菜谱。
碱有两种配方-basemyapp
my_java中,我想使用java_with_custom_stuff的食谱(同一本食谱)。有点像

include_recipe 'my_java'

bash 'custom stuff' do
...
end

java_with_custom_stuff我做的
my_java
但它抱怨说它找不到myapp
有没有办法用同一本食谱的食谱?

最佳答案

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

关于ruby - 厨师-使用同一本食谱的食谱,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38870921/

10-11 08:14