Chapter 9. Ohai and Its Plugin Ecosystem

As part of chef-client run, one of the concerns is to collect information about the underlying operating system, hardware, and other environment-related details. The chef-client relies on a utility called Ohai for this purpose.

Ohai is a tool that is used to detect attributes on a node and, once it has profiled the concerned node, it can emit a JSON data blob, containing all the attributes collected by it. Ohai can be used as a stand-alone utility. However, generally, a chef-client uses it to collect node attributes. When Ohai is used in stand-alone mode, it emits the data as JSON; however, when used by the chef-client, it reports back the data through node attributes.

Ohai comes with its own set of plugins ...

Get Mastering Chef 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.