Skip to content

Instantly share code, notes, and snippets.

View ody's full-sized avatar

Cody Herriges ody

  • Oregon, United States of America
View GitHub Profile
# 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
ody@orihime:[dist]% which git-subtree -- INSERT --
git-subtree () {
cd $(git rev-parse --show-toplevel)
$HOME/local/bin/git-subtree $*
cd $OLDPWD
}
@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': }
}
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
# Temporary machine to develop ldap client implementation against.
node 'ldap-dev.dc1.puppetlabs.lan' {
include role::server
sudo::allowgroup { "techops": }
ssh::allowgroup { "techops": }
}
ldap_entry { 'uid=cody,ou=people,dc=puppetlabs,dc=net':
ensure => present,
objectclass => [
'organizationalPerson',
'inetOrgPerson',
'posixAccount',
'person',
],
attributes => {
'employeeNumber' => '10000000001',
info: Caching catalog for yellow.dc1.puppetlabs.net
/usr/lib/ruby/1.8/puppet/resource.rb:235:in `to_hash'
/usr/lib/ruby/1.8/puppet/resource.rb:68:in `to_pson_data_hash'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:505:in `to_pson_data_hash'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:505:in `collect'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:505:in `to_pson_data_hash'
/usr/lib/ruby/1.8/puppet/indirector/catalog/puppetdb.rb:19:in `munge_catalog'
/usr/lib/ruby/1.8/puppet/indirector/catalog/puppetdb.rb:9:in `save'
/usr/lib/ruby/1.8/puppet/indirector/store_configs.rb:24:in `save'
/usr/lib/ruby/1.8/puppet/indirector/indirection.rb:200:in `find'
Sending QUIT signal to process 25785 ...
>> Exiting!
/var/lib/gems/1.8/gems/thin-1.3.1/lib/thin/daemonizing.rb:158:in `delete': Operation not permitted - /var/run/thin/puppetmaster.3.pid (Errno::EPERM)
from /var/lib/gems/1.8/gems/thin-1.3.1/lib/thin/daemonizing.rb:158:in `remove_pid_file'
from /var/lib/gems/1.8/gems/thin-1.3.1/lib/thin/daemonizing.rb:59:in `daemonize'
Class Foo
attr_accessor :bar
def initialize
@bar = 'new'
end
end
afoo = Foo.new
# Add this to auth.conf
# status
path /status
auth any
method find
allow *
# Run this from the command line
curl -k -H "Accept: pson" https://metis.puppetlabs.lan:8140/production/status/no_key