Created
September 30, 2015 20:37
-
-
Save psalaberria002/a2becc53e5456df1feb5 to your computer and use it in GitHub Desktop.
Configure puppet for using hiera as configuration source.
This file contains 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
#node_type/app-server.yaml | |
--- | |
classes: | |
- java | |
- jboss | |
- apache | |
- vms_deploy | |
# Java directives (The node definitin overrides this) | |
java::install_version: | |
java7: | |
java_version : 7 | |
java_ensure : "present" | |
default : true | |
java8: | |
java_version : 8 | |
java_ensure : "present" | |
default : false |
This file contains 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
Exec { path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ] } | |
node default { | |
$node_type = hiera('node_type','basic_node') | |
hiera_include('classes') | |
} | |
This file contains 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
#hiera.yaml | |
--- | |
:backends: | |
- yaml | |
:yaml: | |
:datadir: /etc/puppet/hieradata | |
:hierarchy: | |
- "node/%{::fqdn}" | |
- "cloud/%{::ec2_services_domain}" | |
- "role/%{::role}" | |
- "node_type/%{node_type}" | |
- common |
This file contains 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
#node/app1-euwest.dataloy.com.yaml | |
--- | |
node_type: app-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment