Conversation
- hiera_configdir : location where to look for hiera.yaml - hiera_yaml_datadir: location where to look for yaml files This can be used with something like this in a site.pp $hiera_configdir=inline_template("<%= File.join(File.dirname(scope.lookupvar('settings::manifest')), '..', 'hieradata') -%>") $hiera_yaml_datadir=inline_template("<%= File.join(File.dirname(scope.lookupvar('settings::manifest')), '..', 'hieradata') -%>") Assuming you have a layout like: puppet manifests site.pp modules ... hiera hiera.yaml This is great for using hiera in puppet standalone with Vagrant
Great work, thanks!!! Works like a charm on Ubuntu Lucid! |
First of all - can we make the two global vars a separate pull request and subsequent ticket? Its kind of unrelated and can be debated and/or pull separately I think. Otherwise - I can see what you're trying to achieve with having the sync of the gem via pluginsync ... it makes sense but I'm worried about how this might be updated in future. Using subtrees or merging it like this makes it unclear as to what version of the gem we are pinning it against. I'd prefer a link like with git-submodules ... but that can be a dirty word at times. Fundamentally this would be something that people are going to rely on I imagine versus installing the gem ... even with the warning - so we would want to have an easy way of updating that content I believe. At least you check for gem existence and use that by default first which is a nice touch. To be honest I'm not sure at this point this is a good idea or not - but I will meditate on it and perhaps pull in some other opinions. |
@jedi4ever Thanks for the patch! Can we get a Redmine ticket open for this? I think a change like this requires a bit more discussion. |
After thinking about this a little bit more, I'm closing this ticket in favor of the work going on here: http://projects.puppetlabs.com/issues/7788. We should also make sure the parser functions log useful error messages if the hiera gem is not installed. It should also be noted that starting with Puppet 3.0.0 hiera will be a hard dependency, like Facter, and will be installed by default. |
|
For custom setting you should be able to do:
|
jedi4ever: ha , just saw you comment on the Hiera.new, if I put this in my rspec as setup, will this be global ? like Puppet[settings] |
Fixes puppetlabs#15 Hiera return nil for false value
This helps in the transition path to use hiera.
$hiera_configdir and $hiera_yaml_datadir