Is there any way to pass attributes into a chef-apply run of a cookbook?
The very first line of my cookbook is:
if node[:my_attr][:enabled]
which leads to:
NoMethodError: undefined method '[]' for nil:NilClass
when I run
chef-apply recipes/default.rb
Adding the appropriate attributes into the attributes/default.rb does not fix this problem, neither does adding an initialization for node[:my_attr] = {}.
How can I pass node attributes into a chef-apply run?