From e50cda3666f187a73d78a32a526c81146b4f1602 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 15 Oct 2019 13:02:26 +0200 Subject: [PATCH] yamlinfo: use different dir to list all nodes We used Dir.entries('/var/lib/puppet/yaml/node/') to get a list of all nodes. That dir is now empty. Switch to using Dir.entries('/var/lib/puppet/yaml/facts/'). Both are probably bad, but yamlinfo() should be phased out in favor of hiera/puppetdb anyhow, so for now this is a temporary fix. --- modules/puppetmaster/lib/puppet/parser/functions/yamlinfo.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/puppetmaster/lib/puppet/parser/functions/yamlinfo.rb b/modules/puppetmaster/lib/puppet/parser/functions/yamlinfo.rb index efab0c2e6..6590d6253 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/yamlinfo.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/yamlinfo.rb @@ -42,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) -- 2.20.1