Method: Chef::Provider::Ohai#action_reload

Defined in:
lib/chef/provider/ohai.rb

#action_reloadObject



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/chef/provider/ohai.rb', line 29

def action_reload
  ohai = ::Ohai::System.new
  if @new_resource.plugin
    ohai.require_plugin @new_resource.plugin
  else
    ohai.all_plugins
  end
  node.automatic_attrs.merge! ohai.data
  Chef::Log.info("#{@new_resource} reloaded")
  @new_resource.updated_by_last_action(true)
end