Let\'s say I have a default attribute in a cookbook:
default.nginx_upstreams = {
\'service1\' => [\'service1.server.com\'],
\'service2\' => [\'
Just wanted to give further insight on Chef attributes, it is very important for users, who is going to refer this question on node attribute override.
File Methods corresponds to attributes
Use the following methods within the attributes file for a cookbook or within a recipe. These methods correspond to the attribute type of the same name:
Attribute Precedence
Attributes are always applied by the chef-client in the following order:
where the last attribute in the list is the one that is applied to the node.
It means that, OHAI attribute will have the highest precedence, where as the default attribute in cookbook attribute file will have the lowest precedence.
Note: Provided the important details from Chef docs for attributes for the benefit of users. Because sometimes the URL will be moved or invalid.