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=22ee3bbbe6d680d15ca6671e01540a6e16734c2c;hb=30be0f0db19c688a30cc568c80be00a6724bd1e2;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..22ee3bbbe 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,11 @@ module Puppet::Parser::Functions facts = IO.read(fn) require 'json' - parsed = JSON.parse(facts) + parsed = {} + facts.each_line do |l| + p = JSON.parse(l) + parsed.update(p) if p + end return parsed[servicename] end end