Analyzing Ansible runs using ARA

The Ansible Run Analysis tool integrates seamlessly with Ansible, offering a simple, intuitive way to find the data you need.
333 readers like this.
Getting started with SQL

Opensource.com

Ansible is a versatile platform that has become popular for managing servers and server configurations. Today, Ansible is used heavily to deploy and test through continuous integration (CI).

In the world of automated continuous integration, it’s not uncommon to have hundreds, if not thousands, of jobs running every day for testing, building, compiling, deploying, and more.

The Ansible Run Analysis (ARA) tool

Ansible runs generate a large amount of console data, and keeping up with high volumes of Ansible output in the context of CI is challenging. The Ansible Run Analysis (ARA) tool makes this verbose output readable and more representative of the job status and debug information. ARA organizes recorded playbook data so you can search and find what you’re interested in as quickly and as easily as possible.

Note that ARA doesn't run your playbooks for you; rather, it integrates with Ansible as a callback plugin wherever it is. A callback plugin enables adding new behaviors to Ansible when responding to events. It can perform custom actions in response to Ansible events such as a play starting or a task completing on a host.

Compared to AWX and Tower, which are tools that control the entire workflow, with features like inventory management, playbook execution, editing features, and more, the scope of ARA is comparatively narrow: It records data and provides an intuitive interface. It is a relatively simple application that is easy to install and configure.

Installation

There are two ways to install ARA on your system:

  • Using the Ansible role hosted on your GitHub account. Clone the repo and do:
ansible-playbook Playbook.yml

If the playbook run is successful, you will get:

TASK [ara : Display ara UI URL] ************************
   ok: [localhost] => {}
   "msg": "Access playbook records at http://YOUR_IP:9191" 

Note: It picks the IP address from ansible_default_ipv4 fact gathered by Ansible. If there is no such fact gathered, replace it with your IP in main.yml file in the roles/ara/tasks/ folder.

  • ARA is an open source project available on GitHub under the Apache v2 license. Installation instructions are in the Quickstart chapter. The documentation and FAQs are available on readthedocs.io.

What can ARA do?

The image below shows the ARA landing page launched from the browser:

ara landing page

It provides summaries of task results per host or per playbook:

task summaries

It allows you to filter task results by playbook, play, host, task, or status:

playbook runs filtered by hosts

With ARA, you can easily drill down from the summary view to find the results you’re interested in, whether it’s a particular host or a specific task:

summary of each task

ARA supports recording and viewing multiple runs in the same database.

show gathered facts

Wrapping up

ARA is a useful resource that has helped me get more out of Ansible run logs and outputs. I highly recommend it to all Ansible ninjas out there.

Feel free to share this, and please let me know about your experience using ARA in the comments.


[See our related story, Tips for success when getting started with Ansible.]

Comments are closed.

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.

Download the ultimate DevOps hiring guide

Build your DevOps team with these best practices for prospective employees and hiring managers.