X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fpuppetmaster%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fwhohosts.rb;h=b55204ac8fdd17712ae920f509c864288301d088;hb=1fb1e088994c071cb659b10b8d4aaafbda70fbf6;hp=ebb9f3de9bd0a07d8a1422f0c62854dd722c2c5c;hpb=a77293d304035c2db27d7f3a0ae0167735249727;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 ebb9f3de9..b55204ac8 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb @@ -5,7 +5,8 @@ module Puppet::Parser::Functions ipAddrs = args[0] yamlfile = args[1] - self.interp.newfile(yamlfile) + parser = Puppet::Parser::Parser.new(environment) + parser.watch_file(yamlfile) $KCODE = 'utf-8' @@ -29,6 +30,9 @@ module Puppet::Parser::Functions end end end + if not ans['longname'] + ans['longname'] = ans['name'] + end return ans end end