Need advice about which tool to choose?Ask the StackShare community!
Ansible vs Packer: What are the differences?
What is 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.
What is Packer? Create identical machine images for multiple platforms from a single source configuration. Packer automates the creation of any type of machine image. It embraces modern configuration management by encouraging you to use automated scripts to install and configure the software within your Packer-made images.
Ansible belongs to "Server Configuration and Automation" category of the tech stack, while Packer can be primarily classified under "Infrastructure Build Tools".
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, Packer provides the following key features:
- Super fast infrastructure deployment. Packer images allow you to launch completely provisioned and configured machines in seconds, rather than several minutes or hours.
- Multi-provider portability. Because Packer creates identical images for multiple platforms, you can run production in AWS, staging/QA in a private cloud like OpenStack, and development in desktop virtualization solutions such as VMware or VirtualBox.
- Improved stability. Packer installs and configures all the software for a machine at the time the image is built. If there are bugs in these scripts, they'll be caught early, rather than several minutes after a machine is launched.
"Agentless" is the top reason why over 251 developers like Ansible, while over 24 developers mention "Cross platform builds" as the leading cause for choosing Packer.
Ansible and Packer are both open source tools. It seems that Ansible with 38.2K GitHub stars and 16K forks on GitHub has more adoption than Packer with 9.1K GitHub stars and 2.47K GitHub forks.
DigitalOcean, 9GAG, and Rainist are some of the popular companies that use Ansible, whereas Packer is used by Instacart, Oscar Health, and Razorpay. Ansible has a broader approval, being mentioned in 960 company stacks & 587 developers stacks; compared to Packer, which is listed in 115 company stacks and 21 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 Packer
- Cross platform builds27
- Vm creation automation9
- Bake in security4
- Good documentation1
- Easy to use1
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