Skip to content

Instantly share code, notes, and snippets.

@robinbowes
Created June 21, 2012 14:34
Show Gist options
  • Save robinbowes/2966061 to your computer and use it in GitHub Desktop.
Save robinbowes/2966061 to your computer and use it in GitHub Desktop.
I have a three-level hiera config: common, environment, node
I was under the impression I could define parts of an hash at each level and hiera would merge them.
ie. given this config:
common.yaml:
---
network:
forward_ipv4: false
gatewaydev: eth0
uat.yaml: (environment-level)
---
network:
domainname: uat.example.com
gateway: 192.168.65.1
nameservers:
- 192.168.65.116
- 192.168.2.119
vm2.yaml: (node-level)
---
network:
foo: bar
...I was expecting hiera('network') on node vm2 in environment uat to return:
network{
forward_ipv4 => false,
gatewaydev => eth0,
domainname => uat.example.com,
gateway => 192.168.65.1,
nameservers => [192.168.65.116, 192.168.2.119],
foo => bar
}
Did I misunderstand what is supposed to happen?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment