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?
Command: vagrant reload [name|id] The configured provisioners will not run again, by default. You can force the provisioners to re-run by specifying the --provision flag.
Vagrant reload will reboot the VM, if the VM was provisioned already in the next run reload will skip those by default. vagrant reload --provision will reboot the VM and run the provision steps if any. in the home of the users are a lot of files needed to ssh.
Command: vagrant box update This command updates the box for the current Vagrant environment if there are updates available. The command can also update a specific box (outside of an active Vagrant environment), by specifying the --box flag. Note that updating the box will not update an already-running Vagrant machine.
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With