厨师/OPSWorks:实例在新发布的Windows食谱版本上失败



windows cookbook版本的>=3.4.5版本中,我们的实例构建失败了,因为我们仍在Chef 11.10 / Berkshelf 3.2.0上。

我在我们的Berksfile中添加了cookbook 'windows', '= 3.4.4',但是构建仍在失败,因为它仍在加载windows 4.1.1,即使在Berksfile中增加了条目。

如何覆盖OPSWorks使用windows 3.4.4

这是完整的错误日志:

Recipe Compile Error in /var/lib/aws/opsworks/cache.stage2/cookbooks/windows/resources/auto_run.rb

NoMethodError
-------------
undefined method `property' for #<Class:0x007f72ac6f8b20>

Cookbook Trace:
---------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/windows/resources/auto_run.rb:22:in `class_from_file'

Relevant File Content:
----------------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/windows/resources/auto_run.rb:
21:  
22>> property :program_name, String, name_property: true
23:  property :path, String, coerce: proc { |x| x.tr('/', '\') }
24:  property :args, String
25:  property :root, Symbol,
26:           equal_to: %i(machine user),
27:           default: :machine
28:  
29:  alias_method :program, :path
30:  
31:  action :create do

在Berksfile中添加下面,这应该适用于11 版本

食谱'Windows',&lt; = 1.44.3'

我通过将其添加到berksfile来修复食谱" Windows"'= 2.0.2'

更新食谱,设置。我还将其添加到错误的Git分支中,因此损失了大约20分钟的时间。

最新更新