On Tuesday, June 2, 2015 at 2:55:16 AM UTC-5, jamese wrote: > > If you use calling_class as part of the hierarchy in your hiera.yaml file, > you can have files named after the calling class. > > https://docs.puppetlabs.com/hiera/1/puppet.html#special-pseudo-variables > > This would allow you to create a yaml file named after each class in > question. > > You can also use calling_module, but that probably wouldn't give the > granularity that you want. >
Yes, one of these is the standard way to approach such problems, provided that you're not looking to provide for cross-module data directly via Hiera. You use the calling_class or calling_module variable to define one or more levels of your hierarchy (i.e. in hiera.yaml), so that lookups choose the correct data file for their context. Note that this is actually more efficient than what you asked: instead of loading *all* the data files, it will load exactly the one it needs. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/80f0bd3d-840f-4a65-8923-22037381b672%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.