X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fpuppetmaster%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fonion_balance_service_hostname.rb;h=8a4a9f41bfff15814910267c4d5265f012306c58;hb=1c07afa774f62ff6df564e37bab79ac42d7032bf;hp=be2d1cb2edac2263d64354a3f767fe586eb90372;hpb=b659c5499f41972c15f2e6e4268be02e20b70bed;p=mirror%2Fdsa-puppet.git diff --git a/modules/puppetmaster/lib/puppet/parser/functions/onion_balance_service_hostname.rb b/modules/puppetmaster/lib/puppet/parser/functions/onion_balance_service_hostname.rb index be2d1cb2e..8a4a9f41b 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/onion_balance_service_hostname.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/onion_balance_service_hostname.rb @@ -4,6 +4,7 @@ module Puppet::Parser::Functions servicename = args.shift() onion_balance_service_hostname_fact = lookupvar('onion_balance_service_hostname') + return nil if onion_balance_service_hostname_fact.nil? require 'json' parsed = JSON.parse(onion_balance_service_hostname_fact)