Skip to content
Debug functionality for hiera
Ruby
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/puppet
spec
.gitignore
.travis.yml
Gemfile
README.md
Rakefile

README.md

Hiera Debug Functions

I wrote a very simple wrapper function for hiera that will output debug information into $logidr/hiera_debug_stephensmacbook. This file will be overwritten on every puppet run.

This includes the scope of the hiera call the default value and the value actually found.

Usage Functions

If you want to find out what hiera is doing when looking up values simple change all hiera function calles to heira_debug, hiera_debug_array, hiera_debug_hash, hiera_debug_include.

Example manifest

$test = hiera_debug('wibble','default')
$test2 = hiera_debug('wibble2',['1','2','3'])
$test3 = hiera_debug_array('wibble2','default')
$test4 = hiera_debug_hash('wibble2',{ key1 =>  val1, key2 => val2})

example logfile

{:version=>2228119500}
{:default=>"default", :value=>"default", :variablename=>"wibble", :lookscope=>"main"}
{:default=>["1", "2", "3"], :value=>["10", "11", "12"], :variablename=>"wibble2", :lookscope=>"main"}
{:default=>"default", :value=>"default", :variablename=>"wibble2", :lookscope=>"main"} 
{:default=>{"key1"=>"val1", "key2"=>"val2"}, :value=>{"key1"=>"val1", "key2"=>"val2"}, :variablename=>"wibble2", :lookscope=>"main"}
You can’t perform that action at this time.