Skip to content

Instantly share code, notes, and snippets.

@lstoll
Created May 8, 2010 21:23
Show Gist options
  • Save lstoll/394785 to your computer and use it in GitHub Desktop.
Save lstoll/394785 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems'
require 'vagrant'
Vagrant::Environment.load!
env = Vagrant::Environment.load!(Dir.pwd)
env.require_persisted_vm
sshconn = Vagrant::SSH.new(env)
sshconn.execute do |ssh|
cmd = "cd /tmp/vagrant-chef && sudo chef-solo -c solo.rb -j dna.json"
ssh.exec!(cmd) do |ch, stream, data|
puts data
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment