Attribute precedence
Attributes are always applied by the chef-client in the following order:
The
default
attribute specified in a cookbook attribute file.The
default
attribute specified in a recipe.The
default
attribute specified in an environment.The
default
attribute specified in a role.The
force_default
attribute specified in a cookbook attribute file.The
force_default
attribute specified in a recipe.The
normal
attribute specified in a cookbook attribute file.The
normal
attribute specified in a recipe.The
override
attribute specified in a cookbook attribute file.The
override
attribute specified in a recipe.The
override
attribute specified in a role.The
override
attribute specified in an environment.The
force_override
attribute specified in a cookbook attribute file.The
force_override
attribute specified in a recipe.The
automatic
attribute collected during the Ohai run.
The last attribute in this list has highest precedence and it's the one that dictates the value associated with an attribute...