Created
August 29, 2014 19:05
-
-
Save pburkholder/b83eda3696aa35cb85a0 to your computer and use it in GitHub Desktop.
Here’s a little one liner that you can paste into a terminal that has the chef gem installed:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env ruby -r chef | |
o = Ohai::System.new; o.load_plugins; @data = Mash.new; o.run_plugins.each { |plugin| @data = Chef::Mixin::DeepMerge.deep_merge(@data, plugin.data) }; File.open('/tmp/ohai.json', 'w') { |f| f.write(JSON.pretty_generate(@data)) }” |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment