Skip to content

Instantly share code, notes, and snippets.

@cdenneen
Created June 6, 2016 14:58
Show Gist options
  • Select an option

  • Save cdenneen/bb9c952fef7576f6bdb53d41ea1dd61c to your computer and use it in GitHub Desktop.

Select an option

Save cdenneen/bb9c952fef7576f6bdb53d41ea1dd61c to your computer and use it in GitHub Desktop.
Hiera Hash Lookup
---
publicbucket: 'myBucket'
profile::searchinfra::idx::esindexer:
app_source_bucket_dirkey: 'ESIndexer'
app_source_bucket: "http://s3.amazonaws.com/%{::publicbucket}/%{hiera('profile::searchinfra::idx::esindexer[app_source_bucket_dirkey]')}"
---
:backends:
- yaml
:hierarchy:
- common
:yaml:
:datadir: '/tmp/hieradata'
$> hiera -c hiera.yaml -h profile::searchinfra::idx::esindexer
{"app_source_bucket_dirkey"=>"ESIndexer",
"app_source_bucket"=>"http://s3.amazonaws.com//"}
$> hiera -c hiera.yaml profile::searchinfra::idx::esindexer.app_source_bucket
http://s3.amazonaws.com//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment