I have a chef system where we have multiple environments and have attributes set in evironment JSON.

I'm having trouble accessing these from within cookbook attribute files and recipes.

link|improve this question
feedback

1 Answer

What does your environment file look like? Are you setting default or override attributes? If you're setting default, note that is a fairly low priority level in the attributes chain, so it might be overridden by a recipe, or a role.

The precedence of the attributes is as follows, from low to high:

  1. default attributes applied in an attributes file
  2. default attributes applied in an environment
  3. default attributes applied in a role
  4. default attributes applied on a node directly in a recipe
  5. normal or set attributes applied in an attributes file
  6. normal or set attributes applied on a node directly in a recipe
  7. override attributes applied in an attributes file
  8. override attributes applied in a role
  9. override attributes applied in an environment
  10. override attributes applied on a node directly in a recipe

Above from:

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.