Skip to content

Instantly share code, notes, and snippets.

@brettswift
Last active March 22, 2016 21:04
Show Gist options
  • Save brettswift/560af53d379e0d86730c to your computer and use it in GitHub Desktop.
Save brettswift/560af53d379e0d86730c to your computer and use it in GitHub Desktop.
nested hiera lookup
group_allocation:
devcoreoeml030.matrix.sjrb.ad: smokestack
devcorebrml030.matrix.sjrb.ad: smokestack
devcoreesbl030.matrix.sjrb.ad: smokestack
devcoreoeml091.matrix.sjrb.ad: the091
devcorebrml091.matrix.sjrb.ad: the091
devcoreesbl091.matrix.sjrb.ad: the091
devcorepptl003.matrix.sjrb.ad: dev_master
tstcorepptl003.matrix.sjrb.ad: tst_master
devcorepptl918.matrix.sjrb.ad: brett_sandbox
devcorepptl919.matrix.sjrb.ad: brett_sandbox
groups:
core030:
data:
tag: smokestack
owner: bcornies
the091:
data:
tag: brettstack
owner: bswift
brett_sandbox:
data:
tag: brett
owner: bswift
my_group_name: "%{hiera('group_allocation')}.%{::fqdn}"
my_group: "%{hiera('groups[%{hiera('my_group_name')}]')}"
#my_tag: ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment