Chapter 3. Chef Language and Style

"Style is what separates the good from the great."

Bozhidar Batsov

In this chapter, we will cover the following recipes:

  • Using community Chef style
  • Using attributes to dynamically configure recipes
  • Using templates
  • Mixing plain Ruby with Chef DSL
  • Installing Ruby gems and using them in recipes
  • Using libraries
  • Creating your own custom resource
  • Extending community cookbooks by using application wrapper cookbooks
  • Creating custom Ohai plugins
  • Creating custom knife plugins

Introduction

If you want to automate your infrastructure, you will end up using most of Chef's language features. In this chapter, we will look at how to use the Chef Domain Specific Language (DSL) from the basic to advanced level. We will end the chapter with ...

Get Chef Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.