how can i test hiera roles using beaker?
developerinlondon opened this issue · 2 comments
whats the best way to test specific hiera roles using puppet beaker? i would rather load up the particular hiera role in question then to have to specify all the settings manually inside my tests.
is there any examples for this?
Hi,
We recently added support in beaker to make it easier to manage the hiera.yaml file and hieradata directory.
In my module here i make use of them.
The copy_hiera_data_to
function allows to transfer hiera files from the repo to the host. See here
The write_hiera_config
function writes out the hiera config file. As argument you can supply the hierarchy.
In an example file here I use that function several times to write a new config and set a new hiera file to be processed.
I hope this helps with your question?
This would be a better topic for the google group - https://groups.google.com/forum/#!forum/puppet-beaker
Otherwise, I think that @electrical has given a good reply so closing out.