You're mostly correct I think - if you ONLY want to manage EC2 instances - although vagrant can easily use Ansible's dynamic inventory system: http://docs.vagrantup.com/v2/provisioning/ansible.html:
Static Inventory
The second option is for situations where you'd like to have more control over the inventory management. With the ansible.inventory_path option
, you can reference a specific inventory resource (e.g. a static inventory file, a dynamic inventory script or even multiple inventories stored in the same directory). Vagrant will then use this inventory information instead of generating it.
This option should probably be called 'existing inventory' or 'external inventory' or something - it just means 'use an inventory that Vagrant didn't generate'.
The real advantage of Vagrant is being able to use the same/similar Vagrantfiles for multiple environments - with the exact same Ansible scripts. So Virtualbox VM's for dev and EC2 for stage/prod with the same Ansible provisioning scripts - and either the same vagrantfile, or two very similar ones.
At that point, you could switch to Docker with a simple change to the provider in the Vagrantfile - or even using --provider
on the command line.
The way Vagrant implements back-end providers makes switching pretty simple.
Vagrant also provides a simple built in command line interface for managing your boxes - seeing status, stopping, starting, rebooting, etc:
vagrant status
vagrant up <machine>
vagrant destroy -f <machine>
which works the same, regardless of the backend provider - Virtualbox, EC2, etc... as well as a load of plugins for other useful things: https://github.com/mitchellh/vagrant/wiki/Available-Vagrant-Plugins
But, it's not perfect. The vagrant-aws
plugin doesn't get a lot of love and if you have complex AWS needs, you might be better off rolling something yourself, either with scripts + Ansible, or Ansible on it's own.