Created
December 30, 2008 07:43
-
-
Save timcharper/41551 to your computer and use it in GitHub Desktop.
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
# put on the server | |
# put in /etc/puppet/custom/plugins/facter/custom_facts.rb | |
require 'yaml' | |
if File.exist?("/etc/puppet/custom_facts.yml") | |
YAML.load_file("/etc/puppet/custom_facts.yml").each do |key, value| | |
Facter.add(key.to_sym) do | |
setcode { value } | |
end | |
end | |
end | |
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
# put on each client, /etc/puppet/customfacts.yml | |
serverrole: app_server | |
datacenter: rackspace |
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
# put these settings in config for each client | |
[puppetd] | |
pluginsync = true | |
server = myserver.mydomain.com | |
certname = general |
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
# these commands go on the puppetmaster server | |
# put in /etc/puppet/manifests/site.pp | |
# process server roles | |
node default { | |
case $serverrole { | |
app_server: { | |
include general | |
include apache | |
include rails | |
} | |
db_server: { | |
include general | |
include database | |
include replication | |
} | |
default: { | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment