chef-web-docs-2016 icon indicating copy to clipboard operation
chef-web-docs-2016 copied to clipboard

chef_node resource has incorrect attributes Attributes

Open christinedraper opened this issue 10 years ago • 0 comments

In: https://docs.chef.io/resource_chef_node.html

It says that the resource has Attributes of: 'default_attributes', 'normal_attributes' etc.

Actually, the only one that is valid in a recipe is 'attributes', which sets the normal attributes (like in the machine resource).

As a possibly relevant aside, it took me a while to realize the syntax for setting 'attributes' in both chef_node and machine is

attributes({ 'x'=> { 'y'=> { 'z'=3 }}})

with the parentheses being required and it being critical that there is no space between attributes and the first parenthesis. (Now I've discovered this, it is 'obvious' with some ruby knowledge, it just wasnt obvious pre-hindsight!)

christinedraper avatar Feb 04 '15 20:02 christinedraper