Skip to content

Instantly share code, notes, and snippets.

View knowledgewarrior's full-sized avatar

Jason Fowler knowledgewarrior

  • Canada
View GitHub Profile
@apsoto
apsoto / chef-ec2.rake
Created September 5, 2011 05:20
Chef EC2 Node Cleanup task
namespace :ec2 do
# setup chef config
#
config = File.join(File.dirname(__FILE__), '..', '.chef', 'knife.rb')
Chef::Config.from_file(config)
load_gem_or_report(%w{aws})
desc 'Delete any ec2-based chef nodes that no longer exist'
task :cleanup_nodes do