Ansible is open-source software, which creates platform for configuration management and the computer management. It combines multi-node deployment of software, configuration management and ad hoc performing tasks. Ansible uses SSH or PowerShell for the pc management in network. It has minimal demands on the installed software, for Linux nodes can manage with Python 2.4 or higher and nodes with MS Windows with PowerShell 3.0 or higher.

Ansible uses modules, which work with JSON and have standard output. They can be written in any programming language. YAML is used for reusable descriptions of states’ nodes.

Michael DeHaan is the author of Ansible, same as the author of provisioning server Cobbler for Linux and co-author of Func framework for distant administration. Ansible belongs to the Linux distribution Fedora, which is created by Red Hat company, it is also in a form of EPEL packages, i. e. Extra Packages for Enterprise Linux, available for Red Hat Enterprise Linux, CentOS, Scientific Linux and other operating systems.

Architecture

Same as most of the systems for configuration management, Ansible can distinguish two different types of servers, control machine and nodes. Orchestration is controlled from one central or control machine, which uses SSH for the access to the manged nodes. Managed nodes are described to the control machine by the inventory.

Ansible uses modules for nodes orchestration. With the help of these modules the Ansible gets to the nodes and executes them using the SSH. These modules are then temporarily saved on nodes and communicate with control machine with the use of JSON protocol in a standard output. When Ansible doesn’t manage nodes anymore, it does not consume any resources, because on these managed nodes aren’t running any programs or demons.

Big part of often used systems for configuration management, as is Chef, Puppet or CFEngine, use agents. For these types of systems is needed to install demon on every node, which then communicates with control machine. Ansible uses architecture without agents, which brings lower network traffic, because individual nodes don’t communicate with the control machine independently.

Design goals

Among design goals of Ansible can be classified:

  • Minimalism. The management system should not require the installation of any additional software.
  • Consistency.
  • Security. Ansible does not use agents in its nodes. The only thing it requires is OpenSSH, which is on a great security level and widely tested.
  • Reliability. Unexpected side effects on managed systems prevents the carefully written Ansible playbook, which is IPA idempotent. If the playbook is badly written, the idempotence can occur.
  • Flat learning curve. For playbooks is used easily manageable and descriptive language, which is based on a YAML and Jinja templates.

Advantages of using Ansible

  • Imperative orchestration. Imperative orchestration functions well, there aren’t problems with sources as with are e. g. at Puppet or Chef.
  • Simple beginning. It is simple to implement Ansible and it is possible to iterate with playbook and roles.
  • Absence of agents. For nodes management is not needed to use agents, which means that Ansible saves the performance.
  • Written in Python. Ansible is written in Python in comparison to most of other solutions. Thanks to that, the execution is simpler, because the required libraries are standardly included in most of Linux distributions.
  • Configuration files. Configuration playbook files are written in YAML, which makes the configuration management and automatization simpler. They are easy to read, support comments and use anchors for reference to other items.

Disadvantages of using Ansible

  • UI. Ansible is originally the tool controlled only with the help of command line. Currently it has graphic user interface, but it is not very advanced.
  • States. Compared to Puppet, Ansible doesn’t support states.
  • Windows support. Although it is possible to use Ansible for Windows, it is mostly focused on Linux usage.