$ cat /etc/hiera.yaml
---
:hierarchy:
- %{operatingsystem}
- common
:backends:
- yaml
:yaml:
:datadir: /tmp/hieradata
$ cat /tmp/hieradata/Debian.yaml
---
kitty : 'Handsome'
$ cat /tmp/hieradata/common.yaml
---
kitty : 'Evil'
$ facter operatingsystem
Debian
$ hiera -d kitty
DEBUG: Thu Feb 09 10:09:01 -0500 2012: Hiera YAML backend starting
DEBUG: Thu Feb 09 10:09:01 -0500 2012: Looking up cat in YAML backend
DEBUG: Thu Feb 09 10:09:01 -0500 2012: Looking for data source common
Evil
$ hiera -d kitty operatingsystem=Debian
DEBUG: Thu Feb 09 10:46:20 -0500 2012: Hiera YAML backend starting
DEBUG: Thu Feb 09 10:46:20 -0500 2012: Looking up cat in YAML backend
DEBUG: Thu Feb 09 10:46:20 -0500 2012: Looking for data source Debian
Handsome
Shouldn't Debian.yaml take priority over common.yaml though? Not sure
why I need to pass operatingsystem=Debian in as an argument to hiera
Best,
Adam
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.