Skip to content

Instantly share code, notes, and snippets.

@JoeStanton
Created February 6, 2013 14:23
Show Gist options
  • Save JoeStanton/4722795 to your computer and use it in GitHub Desktop.
Save JoeStanton/4722795 to your computer and use it in GitHub Desktop.
Packaging a Vagrant VM up for EC2 Provisioning
def package_for_ec2 config, chef
require 'json'
open "chef/#{config.vm.host_name.split('.')[0]}.json", 'w' do |f|
chef.json[:run_list] = chef.run_list
f.write chef.json.to_json
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment