Sha256: 6efdc4c8174099ca2cf8f5417895c3338adcecb7030336762920463f1b92b2d1
Contents?: true
Size: 394 Bytes
Versions: 27
Compression:
Stored size: 394 Bytes
Contents
require 'puppet' require 'json' require 'facter' ENV.fetch('FACTERLIB').split(':').each{|x| Facter.search x } Puppet.initialize_settings Facter.loadfacts data = Facter.collection.to_hash facter_major_ver = Facter.version.split('.').first if ['1','2'].include? facter_major_ver facts = data elsif ['1','2'].include? facter_major_ver facts = data['values'] end jj JSON.parse facts.to_json
Version data entries
27 entries across 27 versions & 1 rubygems