[edit on GitHub]
Chef Infra Client uses six types of attributes to determine the value
that is applied to a node during a Chef Infra Client run. In addition,
Chef Infra Client gathers attribute values from up to five locations.
The combination of attribute types and sources makes up to 15 different
competing values available during a Chef Infra Client run:
default attribute is automatically reset at the start of every Chef
Infra Client run and has the lowest attribute precedence. Use
attributes as often as possible in cookbooks.
|Use the |
force_default attribute to ensure that an attribute defined in
a cookbook (by an attribute file or by a recipe) takes precedence over a
default attribute set by a role or an environment.
normal attribute is a setting that persists in the node object. A
normal attribute has a higher attribute precedence than a
override attribute is automatically reset at the start of every
Chef Infra Client run and has a higher attribute precedence than
normal attributes. An
attribute is most often specified in a recipe, but can be specified in
an attribute file, for a role, and/or for an environment. A cookbook
should be authored so that it uses
override attributes only when
|Use the |
force_override attribute to ensure that an attribute defined
in a cookbook (by an attribute file or by a recipe) takes precedence
override attribute set by a role or an environment.
automatic attribute contains data that is identified by Ohai at the
beginning of every Chef Infra Client run. An
cannot be modified and always has the highest attribute precedence.