mitchellh/vagrant — Issue #591: vm.start("provision.enabled" => false) no longer works as advertised
Author: maaku
Created: 2011-12-13 01:47:06+00:00
State: open

I have a custom provisioner that I hacked together for some ``:shell`` scripts that reboots the vm between each script (necessary because I'm installing some kernel modules). I upgraded from 0.7.x to 0.8.x and Vagrant no longer respects the ``"provision.enabled" => false`` option:

class ReloadProvisioner < Vagrant::Provisioners::Base
def provision!
if vm.created?
vm.halt
vm.start("provision.enabled" => false)
else
vm.env.ui.info I18n.t("vagrant.commands.common.vm_not_created")
end
end
end

Instead the provisioning system gets caught in a recursive infinite loop as it provisions the machine each time it is ``halt``/``start`` by ``ReloadProvisioner``.