Skip to main content

About the Chef Infra Language

The Chef Infra Language is a comprehensive systems configuration language with resources and helpers for configuring operating systems. The language is primarily used in Chef Infra recipes and custom resources to tell the Chef Infra Client what action(s) to take to configure a system. The Chef Infra Language provides resources for system-level components such as packages, users, or firewalls, and it also includes helpers to allow you to make configuration decisions based on operating systems, clouds, virtualization hypervisors, and more. The Chef Infra Language is based on Ruby, allowing you to utilize the power of Ruby when the built-in language doesn’t meet your needs out of the box. If you’d like to learn more about extending your Chef Infra code by using Ruby see our Ruby Guide for further information on Ruby functionality.

Resources

Resources are the cornerstone of the Chef Infra Language. Resources define the desired state of an object on a system. A resource can be as simple as a directory or as complex or a complete security policy. Chef Infra Client ships with over 150 resources for configuring components such as packages, files, directories, or firewalls. For more information on resources in Chef Infra Client including a complete list of those included out of the box see Resources.

Helpers Methods

The Chef Infra Language provides support for using attributes, data bags (and encrypted data), and search results in a recipe, as well as four helper methods that can be used to check for a node’s platform from the recipe to ensure that specific actions are taken for specific platforms.

Edit this page on GitHub

Thank you for your feedback!

×









Search Results