Skip to content

Instantly share code, notes, and snippets.

@lindenle
Last active August 29, 2015 14:01
Show Gist options
  • Save lindenle/fbb9d88aa9594d1ad2ac to your computer and use it in GitHub Desktop.
Save lindenle/fbb9d88aa9594d1ad2ac to your computer and use it in GitHub Desktop.
---
:backends:
- yaml
:yaml:
:datadir: /tmp/hiera
:hierarchy:
- "roles/%{::hostname}"
=>> tree /tmp/hiera
/tmp/hiera
└── roles
└── test.yaml
=>> hiera --config hiera.yaml somefact hostname=test
nil
=>> cat /tmp/hiera/roles/test.yaml
somefact: test
=>> hiera --debug --config /tmp/hiera.yaml somefact hostname=test
DEBUG: 2014-05-05 12:26:51 -0600: Hiera YAML backend starting
DEBUG: 2014-05-05 12:26:51 -0600: Looking up somefact in YAML backend
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment