Home

Awesome

AnsibleDB

About

AnsibleDB is Flask API Web server uses MongoDB as Database to store Ansible reports and ansible facts, this tool can be used to query hosts and facters managed Ansible as well search ansible logs.

Features

Architecture

AnsibleDB is composed of 3 layers :

image

Getting started

in Docker-compose file, you can enable AD authentication by adding the variables below

  LDAP_SERVER: "ldaps://ldap_server:636", LDAP server
  LDAP_BASE_DN: "DC=company,DC=com", Base DN
  LDAP_FID_USERNAME: "CN=fid_ad_account,OU=Users,OU=OU Units,DC=company,DC=com", Active Directory account, will be used to map AD users. 
  LDAP_FID_PASSWORD: "password", password of Active Directory account.
  LDAP_REQUIRED_GROUP: "CN=AD_GROUP,OU=Groups,OU=OU Units,DC=company,DC=com", This variable is used to restrict access to AnsibleDB to only users member of AD group, this is optional, if not provided, all Authenticated users will be able to login to AnsibleDB.

AnsibleDB screenshots

in print screen below, we can see the hosts and ansible stats image

when running ansible with option --diff, the diff changes will be available in the output of ansible run command, as well those diffs will be sent to ansibledb, the changes will be added to the graph and saved to database, user will be able to display the diff changes.

image

image

below, an example where we search for the package openssl on the nodes:

image

below, an example where we search for kernel, the result provide a chart about this facter, the chart will count the number per result.

image

users , will be able to :

  1. Add or remove columns from the inventory, columns are facters available in the database.
  2. for admin only, the number of days to keep logs, older logs will be rotated automatically. Also users can set the number of days to display in dashboard, for example 1, user will see by default last 24H logs in dashboard.
  3. generate and save token, where they can use it to interact with API using curl command or Swagger UI.

image

Add token, using authorize button, then query AnsibleDB, example below query kernel facter

image