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', |
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
yumrepos: | |
epel6: | |
descr: Extra Packages for Enterprise Linux 6 - $basearch | |
mirrorlist: https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch | |
enabled: 1 | |
gpgcheck: 1 | |
gpgkey: http://be.mirror.eurid.eu/epel/RPM-GPG-KEY-EPEL-6 | |
failovermethod: priority |
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
1. Generate a pre-signed certificate for client1.example.com with the following command: | |
puppet cert --generate client1.example.com | |
Puppet will now generate and sign a client certificate in the name of client1. example.com. | |
2. Transfer the three required files; the private key, the client certificate, and the CA certificate, to the new client. These are found in the following locations: | |
/etc/puppet/ssl/private_keys/client1.example.com.pem | |
/etc/puppet/ssl/certs/client1.example.com.pem | |
/etc/puppet/ssl/certs/ca.pem | |
Transfer these to the corresponding directories on the client, and it will then be authenticated without the certificate request step. Note that the location of Puppet's SSL certs varies according to the ssldir setting in puppet.conf. |
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
Vagrant::Config.run do |config| | |
config.vm.box = "CentOS-6.0-x86_64-VB-4.1.8" | |
config.ssh.max_tries = 50 | |
config.ssh.timeout = 300 | |
config.vm.network :hostonly, "192.168.11.44" | |
config.vm.customize ["modifyvm", :id, "--memory", "380"] |
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
# Stages | |
stage { 'repo': before => Stage[package] } | |
stage { 'package': before => Stage[main] } | |
stage { 'post': require => Stage[main] } | |
class{ 'hiera_package': stage => package } |
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
$test_var = hiera('test_var',undef) | |
$cont = inline_template( "<% if @test_var %>test_var : <%= test_var %><% end %>" ) | |
notify{ "This is test_var '$test_var' - template $cont": } |
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: | |
- common | |
:backends: | |
- puppet | |
: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
12:52 < Freeaqingme> Does anybody know if there are ubuntu baseboxes available that run puppet v3 ? | |
12:55 < adaro> wasn't puppet 3 discontinued or something | |
12:56 < Freeaqingme> huh | |
12:56 < Freeaqingme> it's in RC stage | |
12:56 < Freeaqingme> so stable coming up soon. | |
12:56 < Freeaqingme> at least that's what I know | |
12:56 < zipkid> It is. | |
12:56 < zipkid> 2.7.19 is the current v. | |
12:57 < Freeaqingme> yeah, but we're setting up a new infrastructure from scratch. So figured we might as well go for 3 | |
12:57 < zipkid> Freeaqingme: it's just a question of removing the current puppet and installing the new v from yum.puppetlabs.com no sweat. |
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
[main] | |
logdir=/var/log/puppet | |
vardir=/var/lib/puppet | |
ssldir=/var/lib/puppet/ssl | |
rundir=/var/run/puppet | |
factpath=$vardir/lib/facter | |
templatedir=$confdir/templates | |
prerun_command=/etc/puppet/etckeeper-commit-pre | |
postrun_command=/etc/puppet/etckeeper-commit-post |
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 package::install( $packages = hiera_hash('packages', {} ) ) | |
{ | |
if( $packages ) | |
{ | |
create_resources( package, $packages ) | |
} | |
} |