From a3d4f91de193a1b0563037574d170b83abe1bef9 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 1 Mar 2011 11:58:47 +0100 Subject: [PATCH] fixes --- manifests/site.pp | 2 +- modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index 7de155a92..e0f2ef450 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -122,7 +122,7 @@ node default { case $brokenhosts { "true": { include hosts } } - case getfromhash($hosterinfo, "name") { + case getfromhash($hosterinfo, 'name') { "ubcece", "darmstadt", "ftcollins", "grnet": { include resolv } } case $portforwarder_user_exists { diff --git a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb index 022ca895a..1615c3b86 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb @@ -9,7 +9,7 @@ module Puppet::Parser::Functions $KCODE = 'utf-8' - ans = {"name": "unknown"} + ans = {"name" => "unknown"} yaml = YAML.load_file(yamlfile) if (nodeinfo['ldap'].has_key?('ipHostNumber')) @@ -27,7 +27,7 @@ module Puppet::Parser::Functions ans = yaml[hoster] ans['name'] = hoster end - rescue Exception => e + rescue => e raise "Error while trying to match addr #{addr} for net #{net}: #{e.message}\n#{e.backtrace}" end end -- 2.20.1