X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fpuppetmaster%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fonion_global_service_hostname.rb;h=41e160d4f51fbe8409d14bb42b2d0d2c335d4fc6;hb=8be357b77bd0bf55c61541f65e2728edaffa7998;hp=dce7740567b01aa3dae791f114503656b57ead70;hpb=7428fc1d6b4b7a740d54cbbf456d5f6306572e3b;p=mirror%2Fdsa-puppet.git diff --git a/modules/puppetmaster/lib/puppet/parser/functions/onion_global_service_hostname.rb b/modules/puppetmaster/lib/puppet/parser/functions/onion_global_service_hostname.rb index dce774056..41e160d4f 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/onion_global_service_hostname.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/onion_global_service_hostname.rb @@ -14,7 +14,10 @@ module Puppet::Parser::Functions facts = IO.read(fn) require 'json' - parsed = JSON.parse(facts) + parsed = {} + facts.each_line do |l| + p.update(JSON.parse(l)) + end return parsed[servicename] end end