Chris Snow
Chris Snow

Reputation: 24626

programatically restart vagrant box after provisioning (Vagrant 1.4+)

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?

Upvotes: 5

Views: 2768

Answers (1)

Emyl
Emyl

Reputation: 10536

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"

Upvotes: 7

Related Questions