Method: Puppet::Indirector::Hiera.hiera_config

Defined in:
lib/puppet/indirector/hiera.rb

.hiera_configObject



78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/puppet/indirector/hiera.rb', line 78

def self.hiera_config
  hiera_config = Puppet.settings[:hiera_config]
  config = {}

  if Puppet::FileSystem.exist?(hiera_config)
    config = Hiera::Config.load(hiera_config)
  else
    Puppet.warning _("Config file %{hiera_config} not found, using Hiera defaults") % { hiera_config: hiera_config }
  end

  config[:logger] = 'puppet'
  config
end