- From: Wes Morgan <
>
- To:
- Subject: [chef] Re: Re: reload ohai plugins from provider?
- Date: Sun, 5 Aug 2012 10:11:25 -0600
This ended up working:
ohai_plugins = Chef::Resource::Ohai.new("custom_plugins", run_context)
ohai_plugins.run_action(:reload)
Wes
On Aug 4, 2012, at 2:05 PM, Ash Berlin
<
>
wrote:
>
>
On 4 Aug 2012, at 19:49, Wes Morgan wrote:
>
>
> I have a provider that changes some ohai plugin provided attributes. How
>
> can I tell ohai to reload its plugins from the provider? `notifies
>
> :reload, "ohai[custom_plugins]", :immediately` doesn't seem to work there.
>
>
>
> Wes
>
>
>
I haven't used an ohai plugin myself but I think the nginx cookbook does it
>
by simply including the ohai receipe
>
(https://github.com/opscode-cookbooks/nginx/blob/master/recipes/ohai_plugin.rb
>
) which in turn delegates to
>
>
https://github.com/opscode-cookbooks/ohai/blob/master/recipes/default.rb
>
>
However I suspect this won't work correctly if this happens more than once
>
during a run - you might be able to get around it via a ruby block resource
>
>
-ash
>
Archive powered by MHonArc 2.6.16.