title: Custom ohai plugin runs but doesn't update attributes
body: <p>I've written a very simple custom ohai plugin. It should just check if there are any files on the system with .war extensions. The chef client run seems to execute just fine (<code>re-run ohai and merge results into node attributes</code>). However, from my knife workstation if I edit all the node attributes, there is nothing coming up for the warFiles mash I set. Don't see the extra attribute in the Chef Manage GUI either. The cookbook is named "inventory". Why isn't my attribute being stored???</p>
  
  <p>My "plugin" really just consists of a ruby file here:</p>
  
  <pre><code> [root@host default]# pwd
   /root/chef/cookbooks/inventory/files/default
   [root@host default]# cat stuff_ohai_will_do.rb
  Ohai.plugin(:Packages) do
    provides 'warFiles'
  
    collect_data(:default) do
      warFiles Mash.new
  
        so = shell_out('find / -type f -name "*.war"')
        warFiles[:file] = so.stdout.split("\n")
    end
  end
  </code></pre>
  
  <p>and </p>
  
  <p>my metadata.rb has these 2 lines in addition to the pre-configured stuff in there:</p>
  
  <pre><code>depends 'ohai'
  depends 'chef-client'
  </code></pre>
  
  <p>and then a recipe here:</p>
  
  <pre><code> [root@host recipes]# pwd
   /root/chef/cookbooks/inventory/recipes
   [root@host recipes]# cat ohai_plugin.rb
   include_recipe 'ohai::default'
   include_recipe 'chef-client::config'
  
   ohai "reload" do
     action :reload
   end
  
   cookbook_file "#{node['ohai']['plugin_path']}/stuff_ohai_will_do.rb" do
     notifies :reload, "ohai[reload]"
   end
  </code></pre>
  
  <p>This is the output of the chef-client run:</p>
  
  <pre><code>[root@host chef]# chef-client -o recipe[inventory::ohai_plugin]
  Starting Chef Client, version 12.15.19
  resolving cookbooks for run list: ["inventory::ohai_plugin"]
  Synchronizing Cookbooks:
    - inventory (0.1.0)
    - ohai (4.2.2)
    - cron (3.0.0)
    - logrotate (2.1.0)
    - windows (2.0.2)
    - compat_resource (12.16.1)
    - chef-client (7.0.0)
  Installing Cookbook Gems:
  Compiling Cookbooks...
  Converging 12 resources
  Recipe: chef-client::config
    * logrotate_app[chef-client] action enable
      * directory[/etc/logrotate.d] action create (up to date)
      * template[/etc/logrotate.d/chef-client] action create (up to date)
       (up to date)
    * directory[/var/run/chef] action create (up to date)
    * directory[/var/cache/chef] action create (up to date)
    * directory[/var/lib/chef] action create (up to date)
    * directory[/var/log/chef] action create (up to date)
    * directory[/etc/chef] action create (up to date)
    * file[/var/log/chef/client.log] action create (up to date)
    * template[/etc/chef/client.rb] action create (up to date)
    * directory[/etc/chef/client.d] action create (up to date)
    * ruby_block[reload_client_config] action nothing (skipped due to action     :nothing)
  Recipe: inventory::ohai_plugin
    * ohai[reload] action reload
      - re-run ohai and merge results into node attributes
    * cookbook_file[/stuff_ohai_will_do.rb] action create (up to date)
  
  Running handlers:
  Running handlers complete
  Chef Client finished, 1/14 resources updated in 04 seconds
  </code></pre>
  
  <p>===== UPDATE ===== </p>
  
  <p>I've since found the plugins directory (<code>/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/ohai-8.20.0/lib/ohai/plugins</code>). Working directly on the chef node, I have put my plugin ruby file directly in this directory. I know it's the right dir as I moved the uptime.rb file out of the dir, re-ran chef-client, and ran ohai | grep -i uptime ... and uptime was gone. Moving the ruby file back to this directory, I was able to restore uptime to ohai's output. I know the below plugin is in the right directory. </p>
  
  <p><strong><em>Does ohai just execute everything in this directory or is there some ohai list I need to add the file name to? Otherwise, my code or syntax must be wrong</em></strong></p>
  
  <pre><code>[root@host plugins]# cat stuff_ohai_will_do.rb
    Ohai.plugin(:Packages) do
      provides 'warFiles'
  
   collect_data do
     warFiles Mash.new
     so = shell_out('find / -name "*.war"')
     warFiles[:file] = so.stdout
    end
  end
  </code></pre>