X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=modules%2Fpuppetmaster%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fwhohosts.rb;h=ca0d2957c7ec51e0f52ffbce4ca8473cc499184b;hb=HEAD;hp=5dec7b0def29e1abac9b0d1b01c7dcfc6bdb1127;hpb=ab94eacf9979d293ebffc8b3803b9cd179518bad;p=dsa-puppet.git diff --git a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb index 5dec7b0d..ca0d2957 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb @@ -8,8 +8,6 @@ module Puppet::Parser::Functions parser = Puppet::Parser::Parser.new(environment) parser.watch_file(yamlfile) - $KCODE = 'utf-8' - ans = {"name" => "unknown"} yaml = YAML.load_file(yamlfile) @@ -30,6 +28,9 @@ module Puppet::Parser::Functions end end end + if not ans['longname'] + ans['longname'] = ans['name'] + end return ans end end