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=acc06f8a3b65391b44bbb3b56b17a18bab966c22;hp=41e160d4f51fbe8409d14bb42b2d0d2c335d4fc6;hpb=8be357b77bd0bf55c61541f65e2728edaffa7998;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 41e160d4f..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 @@ -16,7 +16,8 @@ module Puppet::Parser::Functions require 'json' parsed = {} facts.each_line do |l| - p.update(JSON.parse(l)) + p = JSON.parse(l) + parsed.update(p) if p end return parsed[servicename] end