Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

provonet/hiera-dyml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What?

A yaml backend for Hiera that will merge hashes by using the excelent deep_merge gem.

Usage?

This backend can be used as a replacement for default Hiera yaml backend, while the default yaml backend overwrites (commplate) hashes this module tries to merge them together.

add this backend to the hiera configfile:

:backends:
  - dyml

:hierarchy:
   - %{hostname}
   - default

:dyml:
  :datadir: .

You can use the same file extention as the default yaml backend (and even the same files)

Example: in the default yaml file from the resolv module you can set the default dns settings like this:

resolv:
  domain: example.com 
  nameservers:
    - 10.0.0.1
    - 10.0.0.2

which might be ok for 99.9% of your servers, but if you want to set the 0.1% of your servers to foo.example.com you will have to overwrite the complete hash with the default yaml backend, with the dyml backend you can just overwrite parts of the hash by using the deep_merge gem module:

resolv:
  domain: foo.example.com 

Who?

Johan Bakker / @provonet Gregory Becker / @igreg [some fixes] Wayne Zhang / @hopecream [Reporting conflicts with ActiveSupport]

About

Hiera YAML backend with support for deep merging of hashes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages