Skip to content

Instantly share code, notes, and snippets.

View ody's full-sized avatar

Cody Herriges ody

  • Puppet Labs
  • Oregon, United States of America
View GitHub Profile
24-May-2012 11:08:10.139 update: info: client 10.0.1.20#45031: updating zone 'dc1.puppetlabs.net/IN': deleting an RR at master.dc1.puppetlabs.net A
24-May-2012 11:08:10.267 update: info: client 10.0.1.20#56344: updating zone 'dc1.puppetlabs.net/IN': deleting an RR at master.dc1.puppetlabs.net TXT
24-May-2012 11:08:10.396 update: info: client 10.0.1.20#36327: updating zone 'dc1.puppetlabs.net/IN': adding an RR at 'master.dc1.puppetlabs.net.dc1.puppetlabs.net' A
24-May-2012 11:08:10.396 update: info: client 10.0.1.20#36327: updating zone 'dc1.puppetlabs.net/IN': adding an RR at 'master.dc1.puppetlabs.net.dc1.puppetlabs.net' TXT
24-May-2012 11:11:13.111 update: info: client 10.0.1.20#34046: updating zone 'dc1.puppetlabs.net/IN': deleting an RR at master.dc1.puppetlabs.net.dc1.puppetlabs.net A
24-May-2012 11:11:13.231 update: info: client 10.0.1.20#47388: updating zone 'dc1.puppetlabs.net/IN': deleting an RR at master.dc1.puppetlabs.net.dc1.puppetlabs.net TXT
24-May-2012 11:11:13.345 update: info: client 10.0.1.2
@ody
ody / gist:2721678
Created May 17, 2012 21:26
Holy crap...stab stab stab
if str2bool(inline_template('<%= "1.5.7" < "2.0.0-M6" -%>')) {
notify { 'true': }
} else {
notify { 'false': }
}
ody@orihime:[dist]% which git-subtree -- INSERT --
git-subtree () {
cd $(git rev-parse --show-toplevel)
$HOME/local/bin/git-subtree $*
cd $OLDPWD
}
# If I was trying to use a cert from an old master but what I really want is just to use the old name of the old CA for signing.
puppet cert clean current-cert.example.com
puppet cert clean old-cert.example.com
puppet cert generate new-cert.example.com --dns_alt_names puppet,puppet.example.com,current-cert,current-cert.example.com,new-cert
Add this to auth.conf (in my case I am setting up multiple activemq brokers.) This will make it so that a certificate with the name broker.example.com.internal-broker can be remotely signed by the puppet agent broker.example.com and only by broker.example.com.
path ~ ^/certificate_status/([^/]+)\.internal-broker$
auth any
method destroy, save
allow $1
Use something like this in your manifest.
exec { 'broker_cert_request':
cron { 'puppet':
ensure => present,
command => 'puppet agent --onetime --splay 60 --no-daemonize',
minute => [ fqdn_rand(30), fqdn_rand(30) + 29 ],
}
info: Loading downloaded plugin /var/opt/lib/pe-puppet/lib/facter/pkg.rb
Debian
nil
Could not retrieve operatingsystem: undefined method `each' for nil:NilClass
info: Loading facts in pkg
Linux
warning: Could not load fact file /etc/puppetlabs/puppet/modules/pkginventory/lib/facter/pkg.rb: undefined method `each' for nil:NilClass
info: Loading facts in facter_dot_d
info: Loading facts in pkg
Linux
lease 172.16.210.142 {
starts 1 2012/01/30 19:59:25;
ends 1 2012/01/30 20:10:27;
hardware ethernet 00:0c:29:1d:6f:c8;
}
lease 172.16.210.128 {
starts 1 2012/01/30 20:08:11;
ends 1 2012/01/30 20:38:11;
hardware ethernet 00:0c:29:dd:61:14;
}
Err Could not retrieve catalog; skipping run Puppet2012-02-01 22:04 UTC
Err Could not retrieve catalog from remote server: Error 400 on
SERVER: Error 400 on SERVER: Mysql::Error: Deadlock found when trying to
get lock; try restarting transaction: INSERT INTO `inventory_facts`
(`name`, `node_id`, `value`) VALUES('productname', 1610, 'VMware Virtual
Platform') Puppet2012-02-01 22:04 UTC
class pe_users {
user { 'pe-puppet':
ensure => present,
comment => 'Puppet configuration management daemon,,,',
gid => '460',
home => '/var/opt/lib/pe-puppet',
shell => '/bin/false',
uid => '103',
}