Need advice about which tool to choose?Ask the StackShare community!
Ansible vs Vagrant: What are the differences?
Ansible: Radically simple configuration-management, application deployment, task-execution, and multi-node orchestration engine. Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates. Ansible’s goals are foremost those of simplicity and maximum ease of use; Vagrant: A tool for building and distributing development environments. Vagrant provides the framework and configuration format to create and manage complete portable development environments. These development environments can live on your computer or in the cloud, and are portable between Windows, Mac OS X, and Linux.
Ansible can be classified as a tool in the "Server Configuration and Automation" category, while Vagrant is grouped under "Virtual Machine Management".
Some of the features offered by Ansible are:
- Ansible's natural automation language allows sysadmins, developers, and IT managers to complete automation projects in hours, not weeks.
- Ansible uses SSH by default instead of requiring agents everywhere. Avoid extra open ports, improve security, eliminate "managing the management", and reclaim CPU cycles.
- Ansible automates app deployment, configuration management, workflow orchestration, and even cloud provisioning all from one system.
On the other hand, Vagrant provides the following key features:
- Boxes
- Up And SSH
- Synced Folders
"Agentless", "Great configuration " and "Simple" are the key factors why developers consider Ansible; whereas "Development environments", "Simple bootstraping" and "Free" are the primary reasons why Vagrant is favored.
Ansible and Vagrant are both open source tools. Ansible with 38.2K GitHub stars and 16K forks on GitHub appears to be more popular than Vagrant with 18.6K GitHub stars and 3.74K GitHub forks.
According to the StackShare community, Ansible has a broader approval, being mentioned in 960 company stacks & 587 developers stacks; compared to Vagrant, which is listed in 802 company stacks and 478 developer stacks.
I'm just getting started using Vagrant to help automate setting up local VMs to set up a Kubernetes cluster (development and experimentation only). (Yes, I do know about minikube)
I'm looking for a tool to help install software packages, setup users, etc..., on these VMs. I'm also fairly new to Ansible, Chef, and Puppet. What's a good one to start with to learn? I might decide to try all 3 at some point for my own curiosity.
The most important factors for me are simplicity, ease of use, shortest learning curve.

I have been working with Puppet and Ansible. The reason why I prefer ansible is the distribution of it. Ansible is more lightweight and therefore more popular. This leads to situations, where you can get fully packaged applications for ansible (e.g. confluent) supported by the vendor, but only incomplete packages for Puppet.
The only advantage I would see with Puppet if someone wants to use Foreman. This is still better supported with Puppet.
If you are just starting out, might as well learn Kubernetes There's a lot of tools that come with Kube that make it easier to use and most importantly: you become cloud-agnostic. We use Ansible because it's a lot simpler than Chef or Puppet and if you use Docker Compose for your deployments you can re-use them with Kubernetes later when you migrate
Pros of Ansible
- Agentless278
- Great configuration205
- Simple195
- Powerful173
- Easy to learn151
- Flexible66
- Doesn't get in the way of getting s--- done54
- Makes sense34
- Super efficient and flexible29
- Powerful27
- Dynamic Inventory11
- Backed by Red Hat8
- Works with AWS7
- Cloud Oriented6
- Easy to maintain6
- Because SSH4
- Multi language4
- Easy4
- Simple4
- Procedural or declarative, or both4
- Simple and powerful4
- Consistency3
- Vagrant provisioner3
- Fast as hell2
- Masterless2
- Well-documented2
- Merge hash to get final configuration similar to hiera2
- Debugging is simple2
- Work on windows, but difficult to manage1
- Certified Content1
Pros of Vagrant
- Development environments352
- Simple bootstraping290
- Free238
- Boxes139
- Provisioning132
- Portable84
- Synced folders81
- Reproducible69
- Ssh51
- Very flexible44
- Works well, can be replicated easily with other devs5
- Easy-to-share, easy-to-version dev configuration5
- Great3
- Quick way to get running2
- Just works2
- What is vagrant?1
- Container Friendly1
- DRY - "Do Not Repeat Yourself"1
- Good documentation1
Sign up to add or upvote prosMake informed product decisions
Cons of Ansible
- Dangerous7
- Hard to install5
- Doesn't Run on Windows3
- Bloated3
- Backward compatibility3
- No immutable infrastructure2
Cons of Vagrant
- Can become v complex w prod. provisioner (Salt, etc.)2
- Multiple VMs quickly eat up disk space2
- Development environment that kills your battery1