# class Chef::Provider::Ohai

### Public Instance Methods

action_reload() click to toggle source

    # File lib/chef/provider/ohai.rb, line 33
    def action_reload
      converge_by("re-run ohai and merge results into node attributes") do
        ohai = ::Ohai::System.new

        # If @new_resource.plugin is nil, ohai will reload all the plugins
        # Otherwise it will only reload the specified plugin
        # Note that any changes to plugins, or new plugins placed on
        # the path are picked up by ohai.
        ohai.all_plugins @new_resource.plugin
        node.automatic_attrs.merge! ohai.data
        Chef::Log.info("#{@new_resource} reloaded")
      end
    end

load_current_resource() click to toggle source

    # File lib/chef/provider/ohai.rb, line 29
    def load_current_resource
      true
    end

whyrun_supported?() click to toggle source

    # File lib/chef/provider/ohai.rb, line 25
    def whyrun_supported?
      true
    end