Morning all... I've hit a bit of an issue with our usage of Data-In-Modules (DIM) provided by ripienaar/module_data with Puppet 3.7.x and was wondering what the best option might be...
TL;DR: How can I change the DIM Hiera lookup scope to use the correct module? Currently, we have the following module architecture: 1. Profile module service class, which wraps: 2. Specific service module, which wraps: 3. A common 'service-framework' module. The 'service module' uses DIM to provide sane defaults for lots of param values, which can then be over-ridden in the profiles class. It also provides a config template snippet that's specific to that service, which then gets evaluated in the 'service-framework' module. The issue I'm hitting is that the scope used for the DIM Hiera lookups is preventing Hiera from resolving the specific service modules data files... In order to illustrate this better, I've done a simple example available here [1]. The README shows an example failure when attempting to run the RSpec unit tests within the 'profile_module', which correlates with the error I'm getting with trying to actually use this same functionality... It also shows a working test from within the 'calling_module', which is effectively the service specific module... I did manage to come up with a slightly ugly hack[2] to the module_data hiera backend, which makes the tests pass... However my understanding is that the same logic has been adopted by Puppet core in the 4.x series, which obviously means we'll hit exactly the same issue if/when we come to upgrade to 4.x... So yeh, any pointers on how best to 'resolve' this issue? Cheers Gavin [1] https://github.com/fatmcgav/puppet_dim_example [2] https://gist.github.com/fatmcgav/e72d8f5bd8d3a5307d3225a15bccd096 -- 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/11105578-8398-437d-bb92-3d8da1b899d2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.