Class: Fauxhai::Runner
- Inherits:
-
Object
- Object
- Fauxhai::Runner
- Defined in:
- lib/fauxhai/runner.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Runner
constructor
A new instance of Runner.
Constructor Details
#initialize(args) ⇒ Runner
Returns a new instance of Runner.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/fauxhai/runner.rb', line 5 def initialize(args) @system = Ohai::System.new @system.all_plugins result = @system.data.dup.delete_if{|k,v| !whitelist_attributes.include?(k)}.merge( 'languages' => languages, 'chef_packages' => chef_packages, 'counters' => counters, 'current_user' => current_user, 'domain' => domain, 'etc' => etc, 'hostname' => hostname, 'fqdn' => fqdn, 'ipaddress' => ipaddress, 'keys' => keys, 'macaddress' => macaddress, 'network' => network, 'uptime' => uptime, 'uptime_seconds' => uptime_seconds, 'cpu' => cpu, 'memory' => memory ) puts JSON.pretty_generate(result) end |