Reputation: 4354
I'm trying to run a cookbook using chef-client by using "chef-apply default.rb" (where default.rb is the default recipe of the cookbook) but I keep getting the same error regardless of the cookbook I'm trying. Is what i'm doing incorrect? Is there another way to execute a single cookbook?
The errors I'm getting are:
[2016-07-20T11:00:57+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2016-07-20T11:00:57+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-07-20T11:00:57+00:00] FATAL: NoMethodError: undefined method `[]' for nil:NilClass
Upvotes: 0
Views: 383
Reputation: 54249
As Tensibai mentioned, chef-apply is for training and sometimes one-off management scripts. It has no concept of "cookbooks". The likely issue is that chef-apply is not running the attributes files (because it can't) so expected default values aren't present in the recipe code.
tl;dr stop using chef-apply
. You probably want chef-solo
.
Upvotes: 1