Book Image

Mastering Chef

By : Mayank Joshi
Book Image

Mastering Chef

By: Mayank Joshi

Overview of this book

Table of Contents (20 chapters)
Mastering Chef
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
2
Knife and Its Associated Plugins
10
Data Bags and Templates
Index

Different types of attributes


Chef provides six different types of attributes, as listed in the following table:

Attribute type

Description

default

This attribute is reset upon the start of every chef-client run and has the lowest attribute precedence. A cookbook should make the most use of the default attributes.

force_default

Say you've specified the same default attribute in role and environment along with a cookbook, and you want to ensure that the attribute in the cookbook takes precedence. In order to do so, one must make use of the force_default attribute type.

normal

A normal attribute is never reset and persists with the node object. It has higher precedence over the default attribute.

override

An override attribute has higher precedence over the default, force_default, and normal attributes. It can be defined in a recipe, role, or environment.

force_override

Similar to the force_default attribute, the force_override attribute specified in a recipe takes precedence over...