Skip to content

Instantly share code, notes, and snippets.

@walterheck
Created July 21, 2014 18:08
Show Gist options
  • Save walterheck/1e608d2e0a729288276d to your computer and use it in GitHub Desktop.
Save walterheck/1e608d2e0a729288276d to your computer and use it in GitHub Desktop.
[root@server01 puppet]# hiera -c hiera.yaml -d apache::package
DEBUG: Mon Jul 21 11:07:17 -0700 2014: Hiera YAML backend starting
DEBUG: Mon Jul 21 11:07:17 -0700 2014: Looking up apache::package in YAML backend
DEBUG: Mon Jul 21 11:07:17 -0700 2014: Looking for data source nonexistenttestlevel
DEBUG: Mon Jul 21 11:07:17 -0700 2014: Cannot find datafile /etc/puppet/hieradata/nonexistenttestlevel.yaml, skipping
DEBUG: Mon Jul 21 11:07:17 -0700 2014: Looking for data source common
nil
[root@server01 puppet]# cat hiera.yaml
---
:merge_behavior: deeper
:backends:
- yaml
:logger: console
:yaml:
:datadir: /etc/puppet/hieradata
:hierarchy:
- nonexistenttestlevel
- fqdn/%{fqdn}
- env/%{environment}/%{fqdn}
- osfamily/%{osfamily}
- lsbdistcodename/%{lsbdistcodename}
- common
[root@server01 puppet]# grep apache::package -ir hieradata/
hieradata/osfamily/RedHat.yaml:apache::package: 'httpd'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment