Ansible is an open source IT configuration management (CM) and automation platform, provided by Red Hat. It uses human-readable YAML templates so that users can program repetitive tasks to occur automatically, without learning an advanced language.
Ansible replaces ad hoc scripting or manual CM with an automated and repeatable process. The tool pushes application code, programs and IT infrastructure setup instructions via modules to managed nodes, whether physical servers, virtual machines (VMs) or cloud instances. The tool also gives users the option to invert its setup to a pull architecture, where managed nodes request instructions from the tool, typically done to enable scaling.
An Ansible user sets up instructions as commands or packages them into reusable plays, executed in playbooks. Ansible performs an orchestration function, giving the user control over the order in which it carries out automated steps.
Ansible is agentless, meaning that it does not install software on the nodes that it manages. This removes a potential point of failure and security vulnerability and simultaneously saves system resources.
The CM tool integrates with other systems management and hosting technologies, including asset libraries, monitoring and collaboration software, and cloud and virtualization platforms. Ansible can control Windows systems using Windows Remote Management (WinRM). The Ansible control node must be Linux, with Python 2.6 or greater.
IT expert Stuart Burns walks through Ansible basics.
As part of Red Hat, Ansible is used in various ways to improve integration and operation of other Red Hat products, such as OpenShift and Red Hat Enterprise Linux (RHEL). For example, an OpenShift user can connect an external database to an OpenShift-hosted, three-tier web app via the OpenShift Ansible Broker (OAB). In addition, Ansible roles and playbooks provide a consistent way to manage Red Hat products across versions.
Ansible is available via apt, Extra Packages for Enterprise Linux (EPEL), Fedora and from Red Hat via its content delivery network (CDN) or Ansible.com.
Ansible Engine and Tower
Ansible is part of Red Hat's systems management product group for enterprise IT. This group comprises Satellite infrastructure management, CloudForms cloud management and the Red Hat Insights monitoring and troubleshooting service.
Ansible Engine is a Red Hat product that provides enterprise support for the open source project. It is a stabilized, hardened version of the upstream automation technologies. Ansible Engine includes the central task runner and modules for core functions, networking, community and other areas. It only works via a command-line interface, which will be familiar to users of a Linux CLI, and the user must have access to all necessary credentials. It follows the Red Hat subscription model used for its other open source offerings, including security and maintenance updates and a service-level agreement (SLA) for response. Ansible Engine is available with two levels of global support. Engine is licensed annually per node, on a 100-, 5,000- and 10,000-node basis.
Ansible Tower is a set of management and access control features that extend Ansible Engine's capabilities. Tower is a supported Red Hat offering based on the upstream AWX project. Thanks to role-based access control (RBAC), the IT operations team using Tower can control user credentials for managed systems. It also includes customizable dashboards and inventory management through a graphical user interface (GUI), a notification system, as well as job scheduling. It has a Tower CLI in addition to the GUI. Tower users can embed Ansible into development, IT and DevOps processes and toolchains via its API. Instance groups and isolated nodes enable fine control over deployments. Licenses for Tower are free for up to 10 nodes or for an evaluation period. Beyond these options, Tower is licensed per 100, 5,000 and 10,000 nodes, annually. Users can pay for Ansible Engine or Tower separately or bundle the two together.
Ansible vs. Chef, Puppet and other tools
Several products offer competing approaches to infrastructure automation, application deployment and CM. Ansible and its competitors offer various open source, supported open source and proprietary commercial offerings, which IT organizations should investigate before choosing a tool. While these products compete for users, IT organizations also deploy them together. For example, Puppet will run configurations that Ansible then orchestrates, or the developer will use Chef while the operations team uses Ansible.
The main competitors to Ansible include:
Ansible was developed in 2012 by Michael DeHaan and acquired by Red Hat in 2015. As such, it is a significantly newer CM technology than Chef and Puppet, and a contemporary of Salt. After acquiring Ansible, Red Hat developed Engine as a commercial offering and created AWX as the open source upstream for Tower.
Ansible and Salt use YAML, while Chef uses JSON and Ruby and Puppet relies on a declarative domain-specific language. PowerShell DSC users must know PowerShell programming. Ansible uses an agentless approach, while the competing offerings from Chef, Puppet, Salt and PowerShell DSC install agents, although there are certain agentless configurations possible.
CM tools, including Ansible, also compete with Docker and other orchestration technologies to manage workloads in containers. An Ansible user can build a container and define the container's payload. Ansible Container is an open source project that builds, deploys and manages containers. While there is also overlap with continuous integration technologies, such as Jenkins, Ansible and its competitors work alongside these tools, handling deployment once the CI pipeline delivers ready code.