[chef] Re: Ohai "require_plugin" not working from ohai command line


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Ohai "require_plugin" not working from ohai command line
  • Date: Mon, 9 Sep 2013 11:19:52 -0700


On Monday, September 9, 2013 at 9:17 AM, wrote:

Say I have an Ohai plugin called lolcode.rb that has something like this:

require_plugin "linux::lolcode"

which delegates to another plugin by the same name located in the "linux"
subdirectory.

When I run chef-client using the ohai cookbook, I can see the node in Chef
Server being updated with the appropriate information from both plugins.
However, if I run

ohai -f lolcode.rb

The "require_plugin" seems to be completely ignored. The "linux/lolcode.rb"
plugin isn't called. I can change the name of the directory and/or plugin to
be something completely invalid and while it doesn't fail, it doesn't work
either.


What am I doing wrong?
It may be a configuration issue where your custom plugins are not in a directory that ohai is searching for plugins. Also, ohai currently is designed to ignore plugin failures. You can get stack traces and such by running with -l debug.

FYI, we're in the middle of a pretty comprehensive overhaul of ohai that will change a lot of this stuff.

-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§