也许有人面临同样的情况
我们在 redis 上有一个干净的实例,它试图把一个厨师默认食谱只有
include_recipe "redisio :: 安装"
当我做饭时收到以下错误环境 AWS ec2.micro ubuntu 12.04 当我运行做饭时收到错误
================================================================================
Recipe Compile Error in /tmp/chef-solo/cookbooks/main/recipes/default.rb
================================================================================
NoMethodError
-------------
undefined method `[]' for nil:NilClass
Cookbook Trace:
---------------
/tmp/chef-solo/cookbooks/ulimit/recipes/default.rb:13:in `block in from_file'
/tmp/chef-solo/cookbooks/ulimit/recipes/default.rb:12:in `from_file'
/tmp/chef-solo/cookbooks/redisio/recipes/install.rb:20:in `from_file'
/tmp/chef-solo/cookbooks/main/recipes/default.rb:11:in `from_file'
Relevant File Content:
----------------------
/tmp/chef-solo/cookbooks/ulimit/recipes/default.rb:
6: # All rights reserved - Do Not Redistribute
7: #
8: ulimit = node['ulimit']
9:
10: case node[:platform]
11: when "debian", "ubuntu"
12: template "/etc/pam.d/su" do
13>> cookbook ulimit['pam_su_template_cookbook']
14: end
15: end
16:
[2013-04-06T14:09:50+00:00] ERROR: Running exception handlers
[2013-04-06T14:09:50+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated
[2013-04-06T14:09:50+00:00] FATAL: Stacktrace dumped to /tmp/chef-solo/chef-stacktrace.out
[2013-04-06T14:09:50+00:00] FATAL: NoMethodError: undefined method `[]' for nil:NilClass
ERROR: RuntimeError: chef-solo failed. See output above.