The ohai-example helps a lot to package a ohai plugin in a cookbook. In my default recipe I use
ohai_plugin 'ohai-example'
After a chef.run the custom ohai plugin is placed at
/home/user/cookbooks/ohai/plugins/ohai-example.rb
I use the following parameters for the chef run:
chef-client --local-mode -c config.rb
My config.rb
chef_zero.enabled true
cookbook_path [
'/home/user/.chef/cookbooks', #ohai cookbook
'/home/user/cookbooks' #ohai-example cookbook
]
local_mode true
Is it possible to specify another directory for the ohai plugins?