https://github.com/gandi/puppet-hiera-deep-merge
puppet' hiera_hash wrapper for deep merging on demand
https://github.com/gandi/puppet-hiera-deep-merge
Last synced: 12 days ago
JSON representation
puppet' hiera_hash wrapper for deep merging on demand
- Host: GitHub
- URL: https://github.com/gandi/puppet-hiera-deep-merge
- Owner: Gandi
- License: bsd-2-clause
- Created: 2015-04-13T07:49:35.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-10-05T11:47:15.000Z (over 10 years ago)
- Last Synced: 2025-03-04T17:50:26.279Z (over 1 year ago)
- Language: Ruby
- Size: 107 KB
- Stars: 2
- Watchers: 31
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Puppet-Hiera deep merge on demand
[](https://travis-ci.org/Gandi/puppet-hiera-deep-merge)
## Why ?
Hiera 1.2 introduces [deep_merge behavior](https://docs.puppetlabs.com/hiera/1/lookup_types.html#deep-merging-in-hiera--120),
which is a major enhancement for managing stuff in Hiera. But merge
behavior is a global setting in Hiera, so migration of large puppet
code bases can be prone to errors. This module provides a new
function named ``hiera_hash_merge`` which uses the `deep_merge`
behavior but does not need a global switch.
## Usage
common.yaml:
``` yaml
key:
subdict:
hidden: in native mode
```
node.yaml:
```
key:
subdict:
anotherkey: foo
```
``` puppet
$value = hiera_hash_merge('key')
$value['subdict']['hidden']
```
## Development
```
bundle install --path vendor/bundle
bundle exec rake spec
```