O'Reilly logo

Mastering Chef by Mayank Joshi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Different sources of attributes

An attribute can be defined at multiple places and it is very important to declare an attribute at the right place with right precedence order. During a chef-client run, attributes are collected from the following different sources:

  • Nodes (collected by Ohai at the start of each chef-client run)
  • Attribute files (associated with cookbook) are collected during compile time
  • Recipes (associated with cookbook. The attributes specified in the recipes might be collected during run time as well
  • Environments
  • Roles

The life cycle of an attribute can be understood by the following sequence of steps:

  1. Developer writes attributes in the attribute file, recipe, role, or environment.
  2. The concerned code is pushed to the Chef server.
  3. During ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required