Hi Garrett, Thanks for the response. The module you posted does indeed help as it shows how to deal with hashes of hiera data without using the create_resources() function.
Thanks, Alex > > Hi, > > The create_resources() function allows you to have a data driven design. > This gives you the ability to specify arbitrary data in Hiera and > decouple data from modules. It means you can change the data without the > code. I would argue that any define in your module should have a > corresponding create_resources() function, so that it can be accessed > through data in Hiera. > > As for ordering, your defines should probably take care of that, though > you can use collections with chaining to help, such as > > Virt::Foo <||> -> Virt::Bar <||> > > When you are using create_resources(), I recommend also specifying an > option to use hiera_hash() to collect your hashes. This does a deep hash > merge and will return values from all levels of the hierarchy. My types > module[1] is an example of this that lets you define file, mount, and > cron resources as hashes. > > [1] - https://github.com/ghoneycutt/puppet-module-types > > Best regards, > -g > > -- > Garrett Honeycutt > @learnpuppet > Puppet Training with LearnPuppet.com > Mobile: +1.206.414.8658 > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/34d1eb41-71ee-4a5d-9258-49d3477dde13%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
