Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fpletz/hiera-multiyaml
YAML backend supporting multiple datadirs for Hiera
https://github.com/fpletz/hiera-multiyaml
Last synced: about 2 months ago
JSON representation
YAML backend supporting multiple datadirs for Hiera
- Host: GitHub
- URL: https://github.com/fpletz/hiera-multiyaml
- Owner: fpletz
- License: apache-2.0
- Created: 2013-12-05T20:14:13.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-05T21:45:19.000Z (about 11 years ago)
- Last Synced: 2023-04-21T15:10:11.939Z (over 1 year ago)
- Language: Ruby
- Size: 121 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MultiYAML backend for Hiera
## Description
All Hiera backends using the `:datadir` configuration, in particular the both
default backends `yaml` and `json` are limited to just one datadir.
Furthermore, only one instance of each backend can be used and configured.Although there is [#1394](http://projects.puppetlabs.com/issues/13954) and
multiple requests for it on mailing lists, Puppetlabs until now hasn't
decided to fix it.After looking at the Hiera code, I know why. They would have to rewrite a
buch of code. This is a quick hack that (unfortunately) duplicates some
code from the `yaml` backend. Avoiding the evilest monkey patching I could
imagine, this was the only option.## Usage
Install the gem using:
$ gem install hiera-multiyaml
And use it in your `hiera.yaml` like this:
:backends:
- multiyaml:multiyaml:
:backends:
- firstyaml
- secondyaml:firstyaml:
:datadir: /etc/puppet/environments/production/data:secondyaml:
:datadir: /var/lib/hieraPlease note that the datadirs will be processed and merged *sequentially* in
the order you specify them. This is exactly the same behaviour as the
`:hierachy` configuration option.