projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df6dee2
)
handle fact not yet existing
author
Peter Palfrader
<peter@palfrader.org>
Sat, 30 Jul 2016 12:56:55 +0000
(14:56 +0200)
committer
Peter Palfrader
<peter@palfrader.org>
Sat, 30 Jul 2016 12:56:55 +0000
(14:56 +0200)
modules/puppetmaster/lib/puppet/parser/functions/onion_balance_service_hostname.rb
patch
|
blob
|
history
modules/puppetmaster/lib/puppet/parser/functions/onion_tor_service_hostname.rb
patch
|
blob
|
history
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
be2d1cb
..
8a4a9f4
100644
(file)
--- 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)
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
9635dba
..
ca642da
100644
(file)
--- 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)