puppetlabs/hiera-puppet — pull request #25 by eshamow (2012-05-10 16:54:53+00:00)
Title: (#13684) Modify hiera function to fall back to default if config absent

As heira gets integrated into the workflow for Puppet, we should
expect users to be able to write modules using the hiera call and
upload those to the forge. At the same time we should expect that
a large number of hosts won't have the hiera library installed yet.
To enable this behavior, the hiera method call should allow module
writers to specify a default value. We then expect the following
behavior:
* If no hiera.yaml is present and the default value is not set, fail.
* If no hiera.yaml is present but there is a default value, opt for
the default, and warn to log about the hiera config.
* If the hiera.yaml is present but not readable, throw an error and
stop.
We only want hiera to stop if the user has attempted to configure
hiera, at which point we can see that there is a config failure
and that we are not in our default install state.