]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb
rename new cert files
[dsa-puppet.git] / modules / puppetmaster / lib / puppet / parser / functions / whohosts.rb
index ed2a0c0436aac40151f28c7d8f8cc538017bd825..b55204ac8fdd17712ae920f509c864288301d088 100644 (file)
@@ -5,6 +5,7 @@ module Puppet::Parser::Functions
 
     ipAddrs = args[0]
     yamlfile = args[1]
+    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