我有食谱 base 和食谱 myapp
base
myapp
基地有2个食谱- my_java 和 java_with_custom_stuff
my_java
java_with_custom_stuff
在里面 带有自定义的java 我想用这个食谱 我的java (同一本食谱)。有点像
带有自定义的java
我的java
include_recipe 'my_java' bash 'custom stuff' do ... end
在里面 我的应用程序 我愿意 include_recipe "base::java_with_custom_stuff"
我的应用程序
include_recipe "base::java_with_custom_stuff"
但它抱怨说找不到 我的java
有没有办法使用同一本食谱中的食谱?
include_recipe 每次都使用第一部分作为食谱名称。因此,您必须指定食谱名称+配方名称:
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