Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Ansible Run Analysis

DZone's Guide to

Ansible Run Analysis

Ansible is commonly used for deploying and testing in CI. The Ansible Run Analysis tool makes its large amounts of console data available and more readable for users.

· DevOps Zone ·
Free Resource

With the influx of DevOps-related products and services on the market, today’s application delivery toolchain has become complex and fragmented. Watch Avoiding the DevOps Tax to learn best practices for integration and automation to realize a faster DevOps lifecycle.

Ansible can be used for a lot of things, and it has grown pretty popular for managing servers and their configuration. Today, Ansible is heavily used to deploy or 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 so on.

Problem

Well, you cannot call it a "problem," but Ansible runs generate quite a large amount of console data. And yes, it continues to grow with each flag (Remember -v & -vvv?) that you add to the run!

Keeping up with such a large amount of Ansible runs and their outcome, not just in the context of CI, is challenging.

Due to this mess, one tends to feel the need of something, that will present this verbose output in a way which is easily readable, graphical, tabular, and more representative of the job status and debug information.

That something is ARA.

Ansible Run Analysis (ARA) Tool

ARA records Ansible playbook runs and makes the recorded data available and intuitive for users and systems. ARA organizes recorded playbook data in a way to make it intuitive for you to search and find what you’re interested in as fast and as easily as possible.

ARA

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

ARA

It allows you to filter task results by playbook, play, host, task, or by the status of the task.

ARA

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

ARA

Beyond browsing a single ansible-playbook run, ARA supports recording and viewing multiple runs in the same database.

ARA

Installation

There are two ways in which you can install ARA in your system.

  • Using Ansible Role hosted on my GitHub Account

    • Clone the repo and run:

        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 present in the roles/ara/tasks/ folder.

  • ARA is an open source project available on GitHub under the Apache v2 license. Installation instructions are present under the Quickstart chapter.

Conclusion

Ever since I came across this tool, it's been a useful resource for me to get more out of Ansible run logs and outputs. I would highly recommend it for all Ansible Ninjas out there.

Feel free to share this with others and do let me know your experience with using ARA.

Automation and collaboration are critical to increasing operational efficiency, accelerating delivery, and innovating products. Watch Overcoming Barriers to DevOps Automation to gain insight on ways you can automate your processes with CI/CD and overcome common obstacles to developing a faster DevOps lifecycle.

Topics:
devops ,ansible ,configuration management ,continuous integration

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}