I've got a vagrant file that builds a local VM. I want to add the EC2 provider and have the option of either provisioning a local VM or one on EC2.
Can I create configs for multiple providers in the same Vagrantfile and somehow choose which to run when I do vagrant up
?
Please check this gist posted by @tknerr which works with all providers such as virtualbox, AWS and managed in combination with the vagrant-omnibus plugin. Here is the code from
Vagrantfile
: