Created
June 6, 2012 14:55
-
-
Save zipkid/2882372 to your computer and use it in GitHub Desktop.
Using hiera as node classifier.
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
:hierarchy: | |
- Nodes/%{fqdn} | |
- Domain/%{domain} | |
- %{environment} | |
- common | |
:backends: | |
- yaml | |
- puppet | |
:yaml: | |
:datadir: '/etc/puppet/hieradata' | |
:puppet: | |
:datasource: data |
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
classes: | |
- puppet::agent | |
- ntp | |
- resolv | |
#- motd |
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
# global defaults | |
# backup file changes to the puppet server | |
# Only for complete files managed by puppet! | |
filebucket { 'puppet': | |
server => puppet | |
} | |
File { | |
backup => 'puppet', | |
} | |
# PATH setting | |
Exec { | |
path => '/usr/bin:/usr/sbin/:/bin:/sbin' | |
} | |
# Stages | |
stage { 'pre': before => Stage[main] } | |
stage { 'post': require => Stage[main] } | |
#class { | |
# "installsource::repo": stage => pre | |
# "nagios::nrpe::checks": stage => post | |
#} | |
# Default stuff for ALL nodes | |
node default | |
{ | |
include common | |
} |
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
class common { | |
$classes = hiera( 'classes', [] ) | |
class { $classes: } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment