Ansible vs. Puppet: The Key Differences to Know

DevOps professionals these days are managing more servers with more applications than ever before. To handle the increasingly complex tasks, dozens of configuration management (CM) tools, such as Ansible and Puppet, have been introduced. GB Advisors says configuration management is “a vital process,” and C2S Consulting Group says CM “is imperative in the DevOps model to support continuous integration.”

CM tools allow an admin to execute tasks on several servers at the same time as well as deploy multiple apps with just one click. But how do you decide which is the best tool for your needs? In this article we’ll cover Ansible vs. Puppet, two of the most popular CM tools, to get you started.

Background

Puppet has been around since 2005 and is considered the biggest player in the CM market with the biggest share. It is produced by Oregon software development company Puppet, founded by Luke Kanies. It was developed in Ruby, is open source and runs on all the major operating systems: Linux, Unix, Mac OS and Windows. Oracle and Google, as well other big-name companies, run their data servers using Puppet. A commercial version, Puppet Enterprise, is available through PuppetLabs as well, and it includes professional support, but some users complain that PuppetLabs is too aggressive in pushing companies to buy it. Some users also say that Puppet is slow to adopt requested changes, such as adding new features and fixing bugs.

Ansible was introduced in 2012 by AnsibleWorks, is now owned by Red Hat, and has a much smaller market share than Puppet, which seems only natural because Puppet has been around a lot longer. Like Puppet, it is open source and also has an enterprise version (Ansible Tower). But unlike Puppet, it was designed In Python (not Ruby) and is meant to be lightweight and have fast deployment. Since Python is built into most Unix and Linux systems, getting Ansible up and running can be done fairly quickly, and its agentless nature adds to the ease of setup and use. Also, the CLI accepts commands in almost any language, which is a big benefit. Ansible includes hundreds of modules to support a wide range of integrations, including Amazon Web Services (AWS). Ansible only recently began supporting Windows.

For more details on Ansible vs. Puppet in terms of setup, language, GUI, CLI and other features and uses of the tools themselves, please see the individual sections below.

Ansible vs. Puppet: Ease of Setup and Use

Ansible is widely considered to be simpler to install and use. Puppet is model-driven and was built with systems administrators in mind. It follows a client-server (or agent-master) architecture; you install Puppet Server on one or more servers, and then install Puppet Agent on all the nodes you want to manage. Puppet uses its own declarative language (also called domain-specific language, or DSL). The company says installation takes 10 to 30 minutes, depending on the environment and needs.

Ansible has a master but no agents running on the client machines—all functions are performed over SSH protocol. Being agentless is one of the features most touted in discussions about Ansible’s simplicity. And Ansible uses YAML syntax. Complex tasks are handled in configuration files called playbooks, and commands can be written in almost any programming language. Plus, Ansible is written in Python, which is built in to most Unix and Linux deployments, making setup even easier/faster.

Despite being more complicated in some ways, Puppet does have advantages over Ansible in its use. A big one is that if you have syntax errors, they can be easily highlighted in Puppet before you run the task. In Ansible, tasks are executed in order and you won’t know if a specific task will fail until that task is executed. And YAML isn’t a particularly easy language to debug.

Ansible vs. Puppet: Management and Scheduling

Management of Ansible vs. Puppet focuses on push and pull configurations. In Puppet, the client pulls configurations from the server, whereas in Ansible, the server pushes configurations to the nodes, for instantaneous deployment. Plus, in Puppet you have to write the configurations in Puppet’s language, as mentioned, whereas in Ansible you use YAML, which is close to English.

As for scheduling, in the default settings, Puppet Agent checks every 30 minutes to make sure the nodes are in the desired state. The free version of Ansible doesn’t include that capability; you’d need to use the enterprise version, Ansible Tower, for that.

Overall, Ansible lacks some advanced features that Puppet and other more mature competitors have.

Ansible vs. Puppet: Availability

Both Ansible and Puppet have backups in case of failure, meaning availability need never be interrupted. Ansible has a secondary node in case the active node fails, and Puppet has more than one master in case the original master fails.

Ansible vs. Puppet: Scalability

Both tools are highly scalable, meaning they can handle a big increase in nodes with no problem. However, scalability is generally considered to be easier in Ansible.

Ansible vs. Puppet: Modules

Puppet Forge is Puppet’s repository/library; Ansible’s is called Ansible Galaxy. Forge is huge (almost 6,000 modules), and the modules can be marked as approved/supported by Puppet, so you won’t have to waste your time on ones that haven’t been proven to work. Galaxy doesn’t have this feature, so you may have to spend some time and effort changing things manually.

Ansible vs. Puppet: GUI

Puppet’s graphical user interface (GUI) is more highly developed than Ansible’s. It’s used for viewing, managing and monitoring; for more complex tasks, you’ll probably use the command-line interface CLI, which is based on Ruby.

When it was introduced, Ansible was a command-line-only tool. Now you can get a UI if you use the enterprise version, but it’s by no means perfect. In fact, the GUI is sometimes not in sync with the command line, and it can’t do all the same things as the CL.

Ansible vs. Puppet: Support

As Puppet has been around several years longer than Ansible, you can probably already guess that there would be more support for it and a bigger developer community—and you’d be right. There’s a dedicated support portal with a knowledge base, and two levels of professional support are offered: Standard (included) and Premium. You can also access a technical account manager (TAM) or become involved in the Puppet community (thousands of people) by attending events or participating in other channels. Puppet also offers a “State of DevOps” report annually that is a great resource for learning about DevOps trends.

Ansible offers two levels of professional support for its enterprise version. There are also more than 200 meetups around the world; a bigger gathering of users and contributors annually, called AnsibleFest; and mailing lists by topic, such as general questions, developer questions and announcements. Overall, it has a smaller developer and user community than Puppet and fewer support and troubleshooting resources on the web.

Ansible vs. Puppet: Pricing

As mentioned, the basic versions of both Puppet and Ansible are free and open source. As for the commercial versions, you’ll pay depending on the support level you need, as follows.

How Much Does Puppet Enterprise Cost?

You can try out Puppet Enterprise on 10 nodes for free. It costs about $100 per node per year with a standard support plan; premium support is $199 per node per year.

How Much Does Ansible Tower Cost?

Ansible Tower has three levels of pricing: 1. Self-support (that is, support isn’t included) is $5,000 per year for up to 100 nodes; 2. Standard (also known as 8x5 support) is $10,000 per year for up to 100 nodes, or $13,000 per year with Ansible Engine; and 3. Premium (24x7 support) is $14,000 per year for up to 100 nodes, or $17,500 with Ansible Engine.

So Which Is Better, Ansible or Puppet?

The answer is, it depends. Both tools are excellent for different reasons, and each has advantages and disadvantages. The major differences between Ansible and Puppet mean that the right choice really comes down to your organization’s specific needs. Many use Ansible for small, fast and/or temporary deployments, whereas Puppet is often used for more complex or longer-term deployments. If you have a mostly fixed set of machines to maintain, Puppet might be the better option, whereas if your machines are often being reprovisioned, Ansible might be the way to go.

Want to learn more about these important DevOps tools? Check out Simplilearn’s Ansible Foundation training course and Puppet Foundation training course. Looking to get even further ahead in the field of DevOps and start earning a higher salary? Having a DevOps certification on your résumé is the way to go.

About the Author

Shivam AroraShivam Arora

Shivam Arora is a Senior Product Manager at Simplilearn. Passionate about driving product growth, Shivam has managed key AI and IOT based products across different business functions. He has 6+ years of product experience with a Masters in Marketing and Business Analytics.

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