5

I have some fairly complex provisioning on a box, after which I would like to programatically do the equivalent of vagrant reload.

The best solution I have seen is here, however the code at that link seems to be broken on Vagrant 1.4+ (see the comments below the code).

Question: Are there any instructions for Vagrant 1.4?

Chris Snow
  • 23,813
  • 35
  • 144
  • 309
  • related: [Is it possible to restart a machine when provisioning a machine using Vagrant and pickup where the script left off?](https://stackoverflow.com/q/34910988/33499) – wimh Jul 31 '17 at 09:41

1 Answers1

7

You could give a try to this Vagrant plugin I've written:

https://github.com/emyl/vagrant-triggers

Once installed, you should put in your Vagrantfile something like:

config.trigger.after :provision, :execute => "vagrant reload"
Emyl
  • 10,460
  • 2
  • 35
  • 34
  • That does not work for me. Only a message shows that the trigger will be run. But nothing happens actually. – Jeff Li May 19 '17 at 06:14