Skip to main content

ARA Records Ansible

Project description

ARA Records Ansible

ARA Records Ansible and makes it easier to understand and troubleshoot.

logo

It's another recursive acronym and features simplicity as a core principle.

About ara

ara provides Ansible reporting by recording ansible and ansible-playbook commands wherever and however they are run:

  • from a terminal, by hand or from a script
  • from a laptop, desktop, server, VM or container
  • for development, CI or production
  • from most Linux distributions and even on Mac OS (as long as python >= 3.8 is available)
  • from tools that run playbooks such as AWX & Automation Controller (Tower), ansible-(pull|test|runner|navigator) and Molecule
  • from CI/CD platforms such as Jenkins, GitHub Actions, GitLab CI, Rundeck and Zuul

getting-started

In addition to the built-in CLI, the data is made available through an included reporting interface as well as a REST API.

ui-web-demo

Note: open the above gifs in a new tab (or window) if the resolution is too small

How it works

ara records results to SQLite, MySQL and PostgreSQL databases with a standard Ansible callback plugin.

The callback plugin leverages built-in python API clients to send data to a REST API server:

recording-workflow

Requirements

  • Any recent Linux distribution or Mac OS with python >=3.8 available
  • The ara package (containing the Ansible plugins) must be installed for the same python interpreter as Ansible itself

Getting started

Running an API server is not required to get started and it is designed to be simple to record data to a local sqlite database.

For production use, it is strongly encouraged to:

Recording playbooks without an API server

# Install ansible (or ansible-core) with ara (including API server dependencies)
python3 -m pip install --user ansible "ara[server]"

# Configure Ansible to use the ara callback plugin
export ANSIBLE_CALLBACK_PLUGINS="$(python3 -m ara.setup.callback_plugins)"

# Run an Ansible playbook as usual
ansible-playbook hello-world.yml

# Use the CLI to see recorded playbooks
ara playbook list

# Start the development server at http://127.0.0.1:8000
# to query the API or browse recorded results
ara-manage runserver

Recording playbooks with an API server

It is possible to get started with the ara_api role or with the container images published by the project on DockerHub and quay.io:

# Create a directory for a volume to store settings and a sqlite database
mkdir -p ~/.ara/server

# Start an API server with docker from the image on DockerHub:
docker run --name api-server --detach --tty \
  --volume ~/.ara/server:/opt/ara -p 8000:8000 \
  docker.io/recordsansible/ara-api:latest

# or with podman from the image on quay.io:
podman run --name api-server --detach --tty \
  --volume ~/.ara/server:/opt/ara -p 8000:8000 \
  quay.io/recordsansible/ara-api:latest

Once the server is running, ara's Ansible callback plugin must be installed and configured to send data to it:

# Install ansible (or ansible-core) with ara (excluding API server dependencies)
python3 -m pip install --user ansible ara

# Configure Ansible to use the ara callback plugin
export ANSIBLE_CALLBACK_PLUGINS="$(python3 -m ara.setup.callback_plugins)"

# Set up the ara callback to know where the API server is located
export ARA_API_CLIENT="http"
export ARA_API_SERVER="http://127.0.0.1:8000"

# Run an Ansible playbook as usual
ansible-playbook playbook.yaml

# Use the CLI to see recorded playbooks
ara playbook list

# Browse http://127.0.0.1:8000 (running from the container)
# to view the reporting interface

Data will be available on the API server in real time as the playbook progresses and completes.

Live demo

A live demo is deployed with the ara Ansible collection from Ansible Galaxy.

It is available at https://demo.recordsansible.org.

Documentation and changelog

Documentation for installing, configuring, running and using ara is available on ara.readthedocs.io.

Common issues may be resolved by reading the troubleshooting guide.

Changelog and release notes are available within the repository's git tags as well as the documentation.

Community and getting help

Contributing

Contributions to the project are welcome and appreciated !

Get started with the contributor's documentation.

Authors

Code contributions to the project can be viewed from the git log or on GitHub.

The ara parrot logo was designed and contributed by Jason E. Rist.

Copyright

Copyright (c) 2022 The ARA Records Ansible authors

ARA Records Ansible is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

ARA Records Ansible is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with ARA Records Ansible.  If not, see <http://www.gnu.org/licenses/>.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ara-1.7.0.0rc2.tar.gz (16.5 MB view details)

Uploaded Source

Built Distribution

ara-1.7.0.0rc2-py2.py3-none-any.whl (233.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ara-1.7.0.0rc2.tar.gz.

File metadata

  • Download URL: ara-1.7.0.0rc2.tar.gz
  • Upload date:
  • Size: 16.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for ara-1.7.0.0rc2.tar.gz
Algorithm Hash digest
SHA256 dd0f4e5d2ee98c3f02911462553d4c604e00d6dadd47eb70c5d8e4e1c9d5d4ca
MD5 eb999ccd57ee6d153458f35467643744
BLAKE2b-256 927f3aedbd7a3448429549f4b6035e074320a34faec4c845e9f723178b46ad9c

See more details on using hashes here.

File details

Details for the file ara-1.7.0.0rc2-py2.py3-none-any.whl.

File metadata

  • Download URL: ara-1.7.0.0rc2-py2.py3-none-any.whl
  • Upload date:
  • Size: 233.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for ara-1.7.0.0rc2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d26a42cd4ec88baf45e6072d0f88751d27fb24c3241044281407005ee38e580c
MD5 932808e3a66767ce503d0c3d8c6d3eb0
BLAKE2b-256 53444b78ff41c33a83e57000d5a7b665c298dfed3f1b2ca5527dec5b750f94de

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page