-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow customizing module-layer Hiera configuration #732
Conversation
1108ee7
to
ab1a3fc
Compare
Would it be possible to have use the fixtures/hiera.yaml and module hiera.yaml at the same time? It would feel more natural if the fixtures/hiera.yaml acts as global or environment level hiera configuration |
I find myself easily confused when trying to describe the different hiera configs and layers involved when spec-testing a module. Perhaps a directory tree might help me better understand the concern, where
If you're asking about using If you're asking about using ---
 version: 5
 defaults:
 data_hash: yaml_data
 datadir: data
 hierarchy:
 - name: Production module data
 path: ../../../data/common.yaml
 - name: RSpec module data
 path: common.yaml Does that answer your question? |
@nabertrand Thanks for doing this. I'm more than happy to merge this in once the documentation has been updated. The new settings definitely need to be added to the configuration reference https://github.com/rodjek/rspec-puppet/blob/master/docs/documentation/configuration/index.md. As you mentioned though, the interaction of the different hiera layers with spec testing can be a confusing subject, so maybe a bit of a long form explanation as an fragment in https://github.com/rodjek/rspec-puppet/tree/master/docs/_includes that can then be included in the "testing classes", "testing defined types" pages as well. |
#809 encompasses all of this work, in addition to updating the configuration documentation and resolving the merge conflicts on the branch. |
Superseded by #809 |
…r_hiera_customization Allow customizing module-layer Hiera configuration
This adds four new RSpec configuration parameters to modify the behavior of module-layer Hiera data.
The original impetus for creating these settings was to solve errors generated from modules that had eyaml enabled in their hiera config files. Even with :hiera_config set appropriately, Puppet would still try to load hiera data from the module layer. See #626.
If these settings seem useful for merging, I would be glad to update any appropriate documentation.