Multiple providers in a single vagrant file?

jbrown picture jbrown · Jun 12, 2013 · Viewed 9.6k times · Source

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?

Answer

cmur2 picture cmur2 · Jun 12, 2013

You can use a multi-vm environment, where every VM can be provisioned with a different provider and you can choose on commandline which one you want to vagrant up <machine>.