|
Opscode provides a cookbook for distributing custom Ohai plugins.
Add cookbook to chef-repoDownload the cookbook to your Chef Repository. Write custom pluginsSee 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 PathIf 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 ServerThe cookbook needs to be uploaded to the Chef Server to be used. Add the recipe to a run listAdd 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 InformationSee the README.md of the Ohai cookbook for additional information.
|
|
|


