aidanns / vagrant-reload

A plugin that allows you to reload a Vagrant plugin as a provisioning step.
MIT License
174 stars 37 forks source link

Conditional reloading? #2

Open spuder opened 9 years ago

spuder commented 9 years ago

Is it possible to do a conditional reload?

For example, my windows vagrant box requires authentication to active directory which requires a reboot.

After the reboot, chef attempts to run. If there is a problem with the chef cookbook, I debug it, then I run vagrant provision again to force another chef run .

I'd like to only do a reboot the first time a vagrant box starts, and skip it on subsequent runs. Is this possible?

TJM commented 9 years ago

This would be nice in the Linux world too, to reboot if there was a kernel update applied. It would be nice if it was conditional.

danowar2k commented 5 years ago

Maybe you could add something like a variable that contains the path to a file on the machine. If the file exists, the file would then be removed and the machine would be rebooted.