Skip to content

Instantly share code, notes, and snippets.

View sjourdan's full-sized avatar

Stephane Jourdan sjourdan

View GitHub Profile
@sjourdan
sjourdan / chef-ec2.rake
Created September 5, 2011 12:57 — forked from apsoto/chef-ec2.rake
Chef EC2 Node Cleanup task
namespace :ec2 do
# setup chef config
# assumes this file is sibling to .chef dir, ex: CHEF_REPO/tasks
config = File.join(File.dirname(__FILE__), '..', '.chef', 'knife.rb')
Chef::Config.from_file(config)
require 'active_support'
require 'aws'
desc 'Delete any ec2-based chef nodes that no longer exist'