Chef infra Chef-没有名为windows\u http\u acl的资源或方法

Chef infra Chef-没有名为windows\u http\u acl的资源或方法,chef-infra,Chef Infra,我试图在我的一本烹饪书中使用windows\u http\u acllwrp 当我尝试使用它时,我得到了这个错误 ================================================================================ Recipe Compile Error in c:/chef/cache/cookbooks/foo/recipes/bar.rb =========================================

我试图在我的一本烹饪书中使用
windows\u http\u acl
lwrp

当我尝试使用它时,我得到了这个错误

================================================================================
  Recipe Compile Error in c:/chef/cache/cookbooks/foo/recipes/bar.rb
  ================================================================================

  NoMethodError
  -------------
  No resource or method named `windows_http_acl' for `Chef::Recipe "bar"'

  Cookbook Trace:
  ---------------
    c:/chef/cache/cookbooks/foo/recipes/bar.rb:26:in `from_file'

  Relevant File Content:
  ----------------------
  c:/chef/cache/cookbooks/foo/recipes/bar.rb:


   26>> windows_http_acl 'http://+:8080/' do
   27:    user "#{node['domain']}\\foobar"
   28:  end
   29:
我的模块元数据.rb

....

depends          'windows', '~> 1.37.0'
depends          'iis', '~> 4.1.1'
depends          'chef_handler'

我的伯克斯档案

source "https://supermarket.chef.io"

metadata

cookbook 'windows', git: 'https://github.com/opscode-cookbooks/windows.git'    
cookbook 'iis', git: 'https://github.com/opscode-cookbooks/iis.git'
我的默认配方

include_recipe 'windows'
include_recipe 'foo::bar'
我已经试着运行带有调试的chef客户端,但遗憾的是没有透露任何信息

我甚至尝试使用opscode/windows cookbook,并在metadata.rb文件中添加“提供windows\u http\u acl”语句

version          '1.37.0'
supports         'windows'
source_url       "https://github.com/opscode-cookbooks/windows"
issues_url       "https://github.com/opscode-cookbooks/windows/issues"
depends          'chef_handler'

provides         'windows_http_acl'
是什么原因导致我的食谱找不到windows\u http\u acl资源?我对厨师还不太熟悉,所以也许我缺少一些简单的东西

更新

我已尝试删除berksfile.lock,以确保它没有旧版本

DEPENDENCIES
  foo
    path: .
    metadata: true
  iis
    git: https://github.com/opscode-cookbooks/iis.git
    revision: 58fffd8eb30ac34cc99672995e12289556a4a074
  windows
    git: https://github.com/opscode-cookbooks/windows.git
    revision: b469294f7581863f8d76f8b0c0fbfb5dc2617983

GRAPH
  foo(0.x.x)
    chef_handler (>= 0.0.0)
    iis (~> 4.1.1)
    windows (~> 1.37.0)
  chef_handler (1.1.9)
  iis (4.1.1)
    windows (>= 1.34.6)
  windows (1.37.0)
    chef_handler (>= 0.0.0)

正如IRC上的coderanger所指出的,运行下面的命令揭示了我的chef服务器中缺少该资源

knife cookbook show windows 1.37.0 providers
我删除了菜谱并重新编辑,现在列出了http_acl.rb资源

knife cookbook delete windows
rm Berksfile.lock && berks install && berks upload

一个比另一个答案更正确的版本是

berks upload windows --force --no-freeze
这将强制上传,即使您可能在以前的上传中冻结了它。这是运行预发布版本的烹饪书的一般问题