Project

hiera-dyml

0.18
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Hiera YAML backend with support for deep merging of hashes
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.0.0
>= 1.0.0
 Project Readme

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]