Skip to content

Instantly share code, notes, and snippets.

View zipkid's full-sized avatar
💭
Eating 🍪

Stefan Goethals zipkid

💭
Eating 🍪
View GitHub Profile
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"]
@zipkid
zipkid / gist:3496753
Created August 28, 2012 09:56
presign puppet cert
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.
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
# global defaults
# backup file changes to the puppet server
# Only for complete files managed by puppet!
filebucket { 'puppet':
server => puppet
}
File {
backup => 'puppet',
---
tomcat_instances:
rest_service_1:
server_port: 8005
http_connector_port: 8080
https_connector_port: 8443
ajp_connector_port: 8009
tomcat_user: root
tomcat_group: root
tomcat_maj_version: 7
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/create_resources.rb:1: warning: multiple values for a block parameter (2 for 1)
from /etc/puppet-modules/custom/lib/puppet/parser/functions/hiera_resources.rb:38
@zipkid
zipkid / init.pp
Created June 19, 2012 11:29
Hiera class loader
class clsloader {
$klasses = hiera_array( 'classes', [] )
class { $klasses: }
}
@zipkid
zipkid / agent_debug_output
Created June 19, 2012 07:36
Hiera lookup issue...? Why does Hiera suddenly switch the lookup from the module name to the define name...?
hiera-1.0.0-0.1rc3.el6.noarch
hiera-puppet-1.0.0-0.1rc1.el6.noarch
puppet-server-3.0.0-0.1rc3.el6.noarch
puppet-3.0.0-0.1rc3.el6.noarch
[root@pm3 ~]# puppet agent -t --server pm3
Info: Retrieving plugin
Info: Loading facts in /etc/puppet-modules/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /etc/puppet-modules/puppet/lib/facter/puppet_vardir.rb
tomcat_instances:
- default:
server_port: 8005
http_connector_port: 8080
ajp_connector_port: 8009
@zipkid
zipkid / Vagrantfile
Created June 9, 2012 20:03
Puppet testing Vagrantfile
Vagrant::Config.run do |config|
config.ssh.max_tries = 50
config.ssh.timeout = 300
# Master
config.vm.define :pm1 do |pm1_config|
pm1_config.vm.box = "CentOS-6.2-x86_64-minimal"