Last active
December 19, 2015 00:09
-
-
Save kesor/5866683 to your computer and use it in GitHub Desktop.
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/config/client.yaml | |
--- | |
client: example.com | |
environment: vagrant |
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 -- global hiera configuration | |
--- | |
:backends: - yaml | |
:hierarchy: | |
# global client setting, this file is ignored in git | |
# sets the client=someone variable, and possibly environment=something | |
- client | |
- clients/%{client} | |
- clients/%{client}/environments/%{environment} | |
- global/roles | |
- global | |
:yaml: | |
:datadir: /etc/puppet/config/hiera |
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
node default { | |
# discover host role and include its classes | |
$roles = hiera_hash('roles') | |
$hosts = hiera_hash('hosts') | |
include $roles['base'] | |
include $roles[ $hosts[$fqdn]['role'] ] | |
} |
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/config/hiera/global/roles.yaml | |
--- | |
# classes for each role | |
# syntax: | |
# | |
# role_name: | |
# - class_name_1 | |
# - class_name_2 | |
# - ... | |
# | |
roles: | |
puppetserver: | |
# empty | |
graphite: | |
- graphite | |
- collectd | |
- collectd::server |
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/config/clients/example.com/environments/vagrant.yaml | |
--- | |
roles: | |
custom_role_name: | |
- custom_class1 | |
- custom_class2 | |
hosts: | |
puppet.vagrant: | |
role: puppetserver | |
graphite.vagrant: | |
role: graphite | |
custom.vagrant: | |
role: custom_role_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment