Skip to content

Instantly share code, notes, and snippets.

@walterheck
Created July 30, 2013 15:35
Show Gist options
  • Save walterheck/6114053 to your computer and use it in GitHub Desktop.
Save walterheck/6114053 to your computer and use it in GitHub Desktop.
[root@yomamma puppet]# cat hiera.yaml
---
:backends:
- yaml
:yaml:
:datadir: /etc/puppet/hieradata
:hierarchy:
- fqdn/%{fqdn}
- osfamily/%{osfamily}
- common
[root@yomamma puppet]# hiera -d apache::package -c hiera.yaml osfamily=RedHat
DEBUG: Tue Jul 30 16:32:27 +0100 2013: Hiera YAML backend starting
DEBUG: Tue Jul 30 16:32:27 +0100 2013: Looking up apache::package in YAML backend
DEBUG: Tue Jul 30 16:32:27 +0100 2013: Looking for data source osfamily/RedHat
DEBUG: Tue Jul 30 16:32:27 +0100 2013: Found apache::package in osfamily/RedHat
httpd
[root@yomamma puppet]# cat hiera.yaml
---
:backends:
- yaml
:yaml:
:datadir: /etc/puppet/hieradata
:hierarchy:
- fqdn/%{::fqdn}
- osfamily/%{::osfamily}
- common
[root@yomamma puppet]# hiera -d apache::package -c hiera.yaml osfamily=RedHat
DEBUG: Tue Jul 30 16:32:59 +0100 2013: Hiera YAML backend starting
DEBUG: Tue Jul 30 16:32:59 +0100 2013: Looking up apache::package in YAML backend
DEBUG: Tue Jul 30 16:32:59 +0100 2013: Looking for data source common
nil
[root@yomamma puppet]# hiera -V
1.2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment