Skip to content

Instantly share code, notes, and snippets.

@crayfishx
Created August 4, 2014 10:47
Show Gist options
  • Save crayfishx/4ba3dd869b8b07704c9e to your computer and use it in GitHub Desktop.
Save crayfishx/4ba3dd869b8b07704c9e to your computer and use it in GitHub Desktop.
policy :test do
lookup :yaml do
datasource :yaml, {
:datadir => '/etc/puppet/hieradata',
:searchpath => [
'global',
"hosts/#{scope[:hostname]}",
"env/#{scope[:environment]}",
"global"
],
confine :environment, "dev"
hiera_compat
end
lookup :http do
datasource :http, {
:url => 'http://localhost:8800',
:searchpath => [
"/configuration/#{scope[:environment]/?#{key}",
],
confine :calling_module, "myapplication"
exclude :environment, "sandbox"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment