Skip to end of metadata
Go to start of metadata


Opscode provides a cookbook for distributing custom Ohai plugins.



Add cookbook to chef-repo

Download the cookbook to your Chef Repository.

Write custom plugins

See the Writing Ohai Plugins page for instructions on how to write new Ohai plugins. These files will go under cookbooks/ohai/files/default/plugins. They should be Ruby files.

Change the Plugin Path

If you wish to change the directory where the plugins are copied, edit the cookbook attributes file and change the path for the node[:ohai][:plugin_path] attribute.

Upload to your Chef Server

The cookbook needs to be uploaded to the Chef Server to be used.

Add the recipe to a run list

Add the recipeOhai to a node or role run list. Put it first to make sure your custom plugins are loaded and available to other recipes. When Chef runs, during the compile phase the plugins will be copied into place and then loaded and merged with the node. This does cause Ohai to be run twice which can add a few seconds to the total run time of Chef.

Additional Information

See the README.md of the Ohai cookbook for additional information.






Loading Custom Ohai Plugins


Disabling Ohai Plugins



Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.