From 3447dc4828ae4c332d62a8ad97daf0d25fc6c40f Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 24 Aug 2010 23:27:08 -0700 Subject: [PATCH] `vagrant provision` --- lib/vagrant/command/provision.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/vagrant/command/provision.rb diff --git a/lib/vagrant/command/provision.rb b/lib/vagrant/command/provision.rb new file mode 100644 index 000000000..2f4a999ea --- /dev/null +++ b/lib/vagrant/command/provision.rb @@ -0,0 +1,18 @@ +module Vagrant + module Command + class ProvisionCommand < Base + desc "Rerun the provisioning scripts on a running VM" + register "provision" + + def execute + target_vms.each do |vm| + if vm.created? && vm.vm.running? + vm.provision + else + vm.env.ui.info "VM not created. Moving on..." + end + end + end + end + end +end