Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
## kill_node_in_storeconfigs_db.rb Usage: sudo ./kill_node_in_storeconfigs_db.rb <hostname as stored in hosts table> #!/usr/bin/env ruby require 'puppet/rails' Puppet[:config] = "/etc/puppet/puppet.conf" Puppet.parse_config # This should work but Puppet[:dbadapter] is the default sqlite3 no matter what. Puppet::Rails.connect if @host = Puppet::Rails::Host.find_by_name(ARGV[0].strip) print "Killing #{ARGV[0]}..." $stdout.flush @host.destroy puts "done." else puts "Can't find host #{ARGV[0]}." end
This paste will be private.
From the Design Piracy series on my blog: