diff --git a/lib/vagrant/action/builtin.rb b/lib/vagrant/action/builtin.rb index a57f33e58..65a77eb03 100644 --- a/lib/vagrant/action/builtin.rb +++ b/lib/vagrant/action/builtin.rb @@ -5,6 +5,13 @@ module Vagrant # all the necessary Vagrant libraries are loaded. Hopefully # in the future this will no longer be necessary with autoloading. def self.builtin! + # provision - Provisions a running VM + provision = Builder.new do + use VM::Provision + end + + register :provision, provision + # start - Starts a VM, assuming it already exists on the # environment. start = Builder.new do diff --git a/lib/vagrant/vm.rb b/lib/vagrant/vm.rb index 4853f8ae7..bad10f711 100644 --- a/lib/vagrant/vm.rb +++ b/lib/vagrant/vm.rb @@ -118,7 +118,7 @@ module Vagrant end def provision - execute!(Actions::VM::Provision) + env.actions.run(:provision) end def destroy diff --git a/test/vagrant/vm_test.rb b/test/vagrant/vm_test.rb index 9b699c3d7..656bee4f1 100644 --- a/test/vagrant/vm_test.rb +++ b/test/vagrant/vm_test.rb @@ -184,7 +184,7 @@ class VMTest < Test::Unit::TestCase context "provisioning" do should "execute the provision action" do - @vm.expects(:execute!).with(Vagrant::Actions::VM::Provision).once + @vm.env.actions.expects(:run).with(:provision).once @vm.provision end end