X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fpuppetmaster%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fonion_tor_service_hostname.rb;h=ca642da43c23284e100b0cdb204158ecf9067ba5;hb=acc06f8a3b65391b44bbb3b56b17a18bab966c22;hp=9635dbabca1f4d27fa7911ff9c35665cf7584356;hpb=b659c5499f41972c15f2e6e4268be02e20b70bed;p=mirror%2Fdsa-puppet.git diff --git a/modules/puppetmaster/lib/puppet/parser/functions/onion_tor_service_hostname.rb b/modules/puppetmaster/lib/puppet/parser/functions/onion_tor_service_hostname.rb index 9635dbabc..ca642da43 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/onion_tor_service_hostname.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/onion_tor_service_hostname.rb @@ -4,6 +4,7 @@ module Puppet::Parser::Functions servicename = args.shift() onion_tor_service_hostname_fact = lookupvar('onion_tor_service_hostname') + return nil if onion_tor_service_hostname_fact.nil? require 'json' parsed = JSON.parse(onion_tor_service_hostname_fact)