Ansible vs Chef: What’s the Difference?

If you work within the software development methodology known as “DevOps”, then you are no doubt aware of the variety of tools available for your use in carrying out everyday tasks. However, sometimes having too many tool choices can confuse and confound, leaving developers puzzled as to what’s the best fit.

Fortunately, this article features a comparison of two popular DevOps tools, Ansible and Chef. We will start by shining the spotlight on each tool individually, then launch into a comparison. Bear in mind, each developer’s needs are different, and what is deemed “best” is very subjective. But at the very least, we will strive to show the differences (and maybe a few similarities), so as to help you make a more informed choice.

A simple Google search on Ansible vs Chef will show you that there’s a host of opinions out there comparing not only these two tools but a few other tools as well. Clearly, this is a topic that needs addressing, considering the growing popularity of the DevOps methodology, so let’s begin our own journey into Ansible vs Chef!

Presenting Ansible

In the words of the software’s own developers, “Ansible is a radically simple IT automation engine that automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT needs.”

Ansible is open source software,and doesn’t rely on a client-server model. According to its designers, Ansible is the only automation engine that can automate the entire application lifecycle and continuous delivery pipeline.

Difficult tasks are turned into repeatable playbooks, simplifying matters greatly and speeding up production.

A nsible’s control machines have to be a Linux/Unix host (e.g. Debian, Red Hat Enterprise Linux, CentOS, macOS, BSD. In addition, Ansible requires Python 2.7 or 3.5. In terms of cloud platforms, Ansible runs on Amazon Web Services, Atomic, CenturyLink, Cloudscale, CloudStack, DigitalOcean, Dimension Data, Docker, Google Cloud Platform, KVM, Linode, LXC, LXD, Microsoft Azure, OpenStack, OVH, oVirt, Packet, Profitbricks, PubNub, Rackspace, Scaleway, SmartOS, SoftLayer, Univention, VMware, Webfaction, and XenServer.

The name “Ansible” is from science fiction literature, describing an instantaneous hyperspace communications system. This should come as a surprise to absolutely no one.

Presenting Chef

Not to be confused with someone who prepares you a gourmet meal, Chef is, in the words of its designers, “…a powerful automation platform that transforms infrastructure into code. Whether you’re operating in the cloud, on-premises, or in a hybrid environment, Chef automates how infrastructure is configured, deployed, and managed across your network, no matter its size.”

It’s an open source cloud configuration that translates system administration tasks into reusable definitions, otherwise known as cookbooks and recipes (hence the clever name “Chef”).

Chef runs on a good mix of platforms, including Windows; enterprise Linux distributions; AIX; FreeBSD; Solaris; Cisco IO; and Nexus. In addition, Chef also supports cloud platforms including Amazon Web Services (AWS), Google Cloud Platform, OpenStack, IBM Bluemix, HPE Cloud, Microsoft Azure, VMware vRealize Automation, and Rackspace.

And Now, Presenting Ansible vs Chef

So, what characteristics distinguish these two open stack configuration tools from each other? Are they more alike than they are different?

Well, Ansible calls its configuration files “playbooks”, while Chef calls them “cookbooks”.

End of story. We’re done.

Just kidding; on the contrary, there are quite a few differences between the two tools, differences that go way beyond just having unique names for their configuration files. Let’s break them down by categories:

Setting it Up: Chef operates with a master-client architecture. The server part runs on the master machine, while the client portion runs as an agent on every client machine. Chef also has an extra component named “workstation” that stores all of the configurations that are tested then pushed to the central server.

On the other hand, Ansible only uses a master running on the server machine, but no agents running on the client machine. It uses an SSH connection to log in to the client systems or the nodes you want to configure, and the client machine VM has no need for special setup.

So, Ansible is faster and easier to set up. That’s a point in its favor.

Cookbooks vs. Playbooks: So what’s this all about? Ansible’s playbooks are easier to grasp as a concept as well as to create, but you pay for that with the limitation on how complex you can make your configuration tasks.

Think of it as analogous to the old Apple Computers vs PCs, where the former was easier for the average person to use, but the latter’s complexity offered you access to greater functions and more control.

Source of Truth: Source of Truth is defined as the authoritative configuration of a given set of systems or system. Ansible’s source of truth comes from its deployed playbooks, which are perfect as source control systems, while

Chef relies on its own server as the source of truth, and those servers require uploaded cookbooks, which means making sure the latter are consistent and identical.

In other words, Ansible's method is easier and makes more sense.

Managing the Tools: With Chef, the client pulls configurations from the server. The configurations are in Ruby DSL, so you need to have programming skills in order to manage those configurations.

Ansible uses YAML (Yet Another Markup Language) to manage configurations, a language that’s similar to English, and the server pushes the configurations to the individual nodes.

The conclusion is, Ansible is easier to manage. And speaking of YAML…

Configuration Language: YAML is an administrator-oriented language that’s easy to learn, while Chef employs a developer-oriented language called Ruby DSL (Domain Specific Language) that’s more difficult to get the hang of.

Advantage: Ansible. Once again, the platform’s simplicity distinguishes it.

Enterprise Cost: Chef Automate charges an annual fee of $137 per node, and gives you everything you need to build and deploy. Ansible Tower standard IT operations is $10,000 a year for up to 100 nodes. This package comes with 8x5 support, unless the premium package is chosen, which ups support to 24x7.

What They Have in Common

Now that we have established the differences, let’s turn to what the two tools have in common.

Availability: In other words, how well do these tools make themselves available to users? Chef uses a backup server that fills in when the primary server goes down. Ansible works on a similar principle; when the Primary instance (the single active node that it runs on) goes down, a Secondary instance kicks in.

Scalability: How do these two tools compare in terms of increasing or decreasing the size to accommodate fluctuating needs? Pretty much the same.  Both Ansible and Chef are easily scalable.

Interoperability: Both the Chef server and the Ansible server require a Linux/Unix machine in order to work. Chef Client and Workstation can work on Windows, and Ansible does support Windows as well. 

So, which of these are better? In reality, it depends on what your organization needs. Chef has been around longer and is great for handling extremely complex tasks. Ansible is easier to install and use, and therefore is more limited in how difficult the tasks can be. It’s just a matter of understanding what’s important for your business, and that goes beyond a simply Ansible vs Chef exercise.

Are You Interested in DevOps?

If all of this talk about DevOps has excited your interest, then Simplilearn has the means of making your career-related dreams come true. Whether you’re already involved in DevOps and are just looking to upskill, or you’re ready to start on the road to a new career, Simplilearn has you covered.

For Ansible, Simplilearn presents the Ansible Foundation Training Course. Ansible 2.0, a simple, popular, agent-free tool in the automation domain, helps increase team productivity and improve business outcomes. Learn with

Simplilearn’s online Ansible 2.0 training and certification course and become an expert in the open-source tool.

Available either as a corporate training solution or through self-paced learning, this beginners course consists of six lessons designed to make you adept in Ansible 2.0 basics, and get you certified.

For those who want to get fully into DevOps, Simplilearn has something for you too: the DevOps Training Course. Available as a corporate training solution or by Online Classroom Flexi-Pass, you will gain the benefits of 56 hours of in-depth blended learning, two dozen live demos of the most popular DevOps tools, over ten industry projects with integrated labs, and 24/7 support.

The program, consists of eight highly informative lessons, and once you have completed the course, you will earn your certification and be ready to launch yourself into an exciting career in DevOps. So whether you’re interested in upskilling or a change in career, Simplilearn can help you meet your goals. 

About the Author

John TerraJohn Terra

John Terra lives in Nashua, New Hampshire and has been writing freelance since 1986. Besides his volume of work in the gaming industry, he has written articles for Inc.Magazine and Computer Shopper, as well as software reviews for ZDNet. More recently, he has done extensive work as a professional blogger. His hobbies include running, gaming, and consuming craft beers. His refrigerator is Wi-Fi compliant.

View More
  • Disclaimer
  • PMP, PMI, PMBOK, CAPM, PgMP, PfMP, ACP, PBA, RMP, SP, and OPM3 are registered marks of the Project Management Institute, Inc.