emyl / vagrant-triggers

Allow the definition of arbitrary scripts that will run on the host before and/or after Vagrant commands.
MIT License
546 stars 35 forks source link

Start machine if necessary for run_remote #79

Closed pfink closed 6 years ago

pfink commented 7 years ago

Hi, this issue is related to #55 and #64. So it's currently possible to ignore run_remote commands with the :force option if the machine is not running.

But what if I want that vagrant ensures that the run_remote command is always used when the machine is destroyed? E.g. if I want to unsubscribe from an enterprise subscription as described here.

For such use cases it would be very helpful to have an option where I can define that, if I run e.g. vagrant destroy, vagrant starts the machine if necessary, run the remote command and then destroy it.