X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fpuppetmaster%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fwhohosts.rb;h=43592854ca1e2f47de66f6ca5394427800ba5ec2;hb=d55193d32bcface5935ae2a6acc2cdc6eed71a80;hp=ed2a0c0436aac40151f28c7d8f8cc538017bd825;hpb=7af611e0182886baa11ae172e741d5e8eb2d2ce4;p=mirror%2Fdsa-puppet.git diff --git a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb index ed2a0c043..43592854c 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb @@ -5,9 +5,6 @@ module Puppet::Parser::Functions ipAddrs = args[0] yamlfile = args[1] - parser.watch_file(yamlfile) - - $KCODE = 'utf-8' ans = {"name" => "unknown"} yaml = YAML.load_file(yamlfile) @@ -29,6 +26,9 @@ module Puppet::Parser::Functions end end end + if not ans['longname'] + ans['longname'] = ans['name'] + end return ans end end