• Stars
    star
    2,334
  • Rank 19,705 (Top 0.4 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 9 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Generate host overview from ansible fact gathering output

Ansible Configuration Management Database

Status: Stable Build Status Activity: Active development License: GPLv3

About

Ansible-cmdb takes the output of Ansible's fact gathering and converts it into a static HTML overview page (and other things) containing system configuration information.

It supports multiple types of output (html, csv, sql, etc) and extending information gathered by Ansible with custom data. For each host it also shows the groups, host variables, custom variables and machine-local facts.

HTML example output.

Features

(Not all features are supported by all templates)

  • Multiple formats / templates:
    • Fancy HTML (--template html_fancy), as seen in the screenshots above.
    • Fancy HTML Split (--template html_fancy_split), with each host's details in a separate file (for large number of hosts).
    • CSV (--template csv), the trustworthy and flexible comma-separated format.
    • JSON (--template json), a dump of all facts in JSON format.
    • Markdown (--template markdown), useful for copy-pasting into Wiki's and such.
    • Markdown Split (--template markdown_split), with each host's details in a seperate file (for large number of hosts).
    • SQL (--template sql), for importing host facts into a (My)SQL database.
    • Plain Text table (--template txt_table), for the console gurus.
    • and of course, any custom template you're willing to make.
  • Host overview and detailed host information.
  • Host and group variables.
  • Gathered host facts and manual custom facts.
  • Adding and extending facts of existing hosts and manually adding entirely new hosts.
  • Custom columns

Getting started

Links to the full documentation can be found below, but here's a rough indication of how Ansible-cmdb works to give you an idea:

  1. Install Ansible-cmdb from source, a release package or through pip: pip install ansible-cmdb.

  2. Fetch your host's facts through ansible:

     $ mkdir out
     $ ansible -m setup --tree out/ all
    
  3. Generate the CMDB HTML with Ansible-cmdb:

     $ ansible-cmdb out/ > overview.html
    
  4. Open overview.html in your browser.

That's it! Please do read the full documentation on usage, as there are some caveats to how you can use the generated HTML.

Documentation

All documentation can be viewed at readthedocs.io.

License

Ansible-cmdb is licensed under the GPLv3:

This program 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.

This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.

For the full license, see the LICENSE file.

More Repositories

1

multi-git-status

Show uncommitted, untracked and unpushed changes for multiple Git repos
Shell
466
star
2

harview

A commandline tool which takes as input a .har (HTTP Archive) file and dumps a human-readable summary of it to the console
Python
51
star
3

sshbg

Change terminal background when SSH'ing (on specific terminals)
Python
49
star
4

scriptform

Webserver that automatically generates forms to serve as frontends to scripts
Python
46
star
5

pyupnpclient

Highlevel UPnP client in Python
Python
38
star
6

bexec

A vim plugin that allows the user to execute the current buffer
Vim Script
23
star
7

awesome-devop-tools

A curated list of development and operational tools.
21
star
8

mdpreview

A simple QT-based Markdown previewer, designed to be used with an external editor.
Python
21
star
9

jerrybuild

Lightweight simple build server
Python
16
star
10

cfgtrack

cfgtrack tracks and reports diffs in files between invocations.
Shell
15
star
11

sec-tools

Unixy security tools for reporting and alerting about security information and events
Python
14
star
12

my_indexr

A tool that outputs SQL commands for dropping and recreating indexes on MySQL databases / tables.
Python
12
star
13

sla

The Simple Little Automator
Shell
12
star
14

thinkndo

A hierarchical outliner and todo manager
Python
8
star
15

hircd

A minimal, hacky implementation of an IRC server daemon written in Python in about 400 lines of code
Python
8
star
16

pybrainfuck

A speed-optimized Brainfuck interpreter written in Python
Python
6
star
17

davis

Python Data Visualizer
Python
6
star
18

whatswrong

Scan your system for misconfigurations, security problems and other issues.
Python
6
star
19

jsonxs

A python library that uses path expression strings to get and set values in JSON
Python
6
star
20

rssmerger

Chronologically merge multiple RSS feeds into a single feed
Python
6
star
21

pydocmd

Generate Python module / script documentation in the Markdown (md) format.
Python
5
star
22

templum

Extremely lightweight, simple yet powerful and fast templating engine for PHP
PHP
5
star
23

gcountdown

A very simple alarm countdown timer that sits in your sys tray.
Python
4
star
24

mod_sec_report

Generate a HTML report from mod_security JSON logging
Smarty
3
star
25

alarm.sh

A small shell script that can aid you in alerting you of things at specified times
Shell
3
star
26

documents

The source for the documents I wrote
HTML
3
star
27

omnitool

Python
3
star
28

mcram

Simple shell script for managing a Minecraft Server on a RAM disk
Shell
3
star
29

timeit

Record periodic command execution time, duration, exitcode and output
Python
2
star
30

myqryreplayer

Read the MySQL query log and replay against a database
Python
2
star
31

rss2mysql

Small script which reads in an RSS feed, takes the news items and then puts them in a MySQL database.
PHP
2
star
32

micromedialauncher

A super-lightweight media browser and launcher.
Python
2
star
33

statlog

Log statistics about CPU, I/O and Memory usage in a plain text file for later analysis.
Python
1
star
34

dataq

A simple data and message queuing server which uses a simple plain-text protocol
Python
1
star
35

lurch

A unixy launcher and auto-typer
Python
1
star
36

qtboot

Scaffolding for QT window.
Python
1
star
37

listpatron

A GTK2 application which keeps lists of things.
C
1
star
38

mcplayeredit

A Minecraft player- and inventory editor (deprecated)
Python
1
star
39

multitray

Python
1
star
40

list-python-pkgs

A high-level overview of which Python package you need to get the job done.
1
star
41

miniorganizer

A small no-nonsense personal digital organizer written in GTK2, featuring appointments, todos and notes
Python
1
star
42

nimf

A two (or more) panel filemanager ala Norton Commander for X written in GTK
C
1
star
43

pieterpost

A pop3/mail web interface written in PHP.
PHP
1
star