0.05
A long-lived project that still receives updates
For use for the Beaker acceptance testing tool
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.10
~> 3.0
~> 0.22.0
~> 13.0

Runtime

>= 4, < 7
 Project Readme

beaker-hiera

License codecov Release RubyGem Version RubyGem Downloads Donated by Puppet Inc

Beaker Hiera DSL Extension Library! This allows to easily use Hiera data in acceptance tests.

Usage

The write_hiera_config_on method is the most important one. It writes the hiera.yaml file to the specified host or hosts. The version is always set to 5, as well as a default datadir. The hierarchy is directly what the documentation specifies. It is then important to also copy the data from a local directory to the same host or hosts.

hierarchy = [
  {
    'name' => 'Per-node data',
    'path' => 'fqdn/%{facts.networking.fqdn}.yaml',
  },
  {
    'name' => 'OS family version data',
    'path' => 'family/%{facts.os.family}/%{facts.os.release.major}.yaml',
  },
  {
    'name' => 'OS family data',
    'path' => 'family/%{facts.os.family}.yaml',
  },
  {
    'name' => 'Common data',
    'path' => 'common.yaml',
  },
]
write_hiera_config_on(host, hierarchy)
copy_hiera_data_to(host, 'spec/acceptance/hieradata')

Transfer Notice

This plugin was originally authored by Puppet Inc. The maintainer preferred that Puppet Community take ownership of the module for future improvement and maintenance. Existing pull requests and issues were transferred over, please fork and continue to contribute here.

Previously: https://github.com/puppetlabs/beaker-hiera

License

This gem is licensed under the Apache-2 license.

Release information

To make a new release, please do:

  • update the version in lib/beaker-hiera/version.rb
  • Install gems with bundle install --with release --path .vendor
  • generate the changelog with bundle exec rake changelog
  • Check if the new version matches the closed issues/PRs in the changelog
  • Create a PR with it
  • After it got merged, push a tag. GitHub actions will do the actual release to rubygems and GitHub Packages