yamlinfo: use different dir to list all nodes
[mirror/dsa-puppet.git] / modules / puppetmaster / lib / puppet / parser / functions / yamlinfo.rb
index 8ae486d..6590d62 100644 (file)
@@ -23,8 +23,6 @@ module Puppet::Parser::Functions
         end
       end
 
-      results['mail_port']      = ''
-
       if yaml['host_settings'].kind_of?(Hash)
         yaml['host_settings'].each_pair do |property, values|
           if values.kind_of?(Hash)
@@ -44,7 +42,7 @@ module Puppet::Parser::Functions
     ret = {}
 
     if host == '*'
-      Dir.entries('/var/lib/puppet/yaml/node/').each do |fname|
+      Dir.entries('/var/lib/puppet/yaml/facts/').each do |fname|
         next unless fname =~ /(.*)\.yaml$/
         host_name = $1
         ret[host_name] = read_yaml.call(yaml, host_name)