Last active
December 12, 2015 09:09
-
-
Save rockpapergoat/4749841 to your computer and use it in GitHub Desktop.
dynamic node definition with hiera. not sure if this will work as intended.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/puppet/hiera.yaml: | |
--- | |
:backends: | |
- yaml | |
:yaml: | |
:datadir: /etc/puppet/hieradata | |
:hierarchy: | |
- %{::clientcert} | |
- %{::role} | |
- common | |
/etc/puppet/manifests/site.pp: | |
node default { | |
$role = hiera("role") | |
include $role | |
} | |
/etc/puppet/hieradata/web1.example.com.yaml: | |
--- | |
role: roles::www | |
/etc/puppet/hieradata/db3.example.com.yaml: | |
--- | |
role: roles::postgresql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment