/Ansible-Graph

Create graphs for Ansible projects and Ansible roles

Primary LanguagePython

Ansible-Graph

With Ansible-Graph you create reports and graphs (using Graphviz) about your Ansible project structure (Directories and Files) and Ansible roles.


Development Requirements

Required Python version:

  • 2.7.x

Min. required libraries:

  • graphviz (0.4.10)
  • defusedxml (0.4.1)
  • pylint (1.5.6 - optional)
  • bandit (1.0.1 - optional)

Installation and usage

Recommended option: (virtualenv)

# install virtualenv with dependencies
$ make env

# install only dependencies
$ make deps

# run pylint (optional)
$ make lint

# run bandit (optional)
$ make bandit

# remove virtualenv
$ make cleanenv

Usage:

# show help
$ .env/bin/python -B ansible_graph.py --help

# run application
$ .env/bin/python -B ansible_graph.py <project> <configuration>

Not-recommended option: (system wide)

# install system wide
$ sudo pip install -r requirements.txt

Usage:

# show help
$ python -B ansible_graph.py --help

# run application
$ python -B ansible_graph.py <project> <configuration>

or

# change chmod
$ chmod u+x ansible_graph.py

# show help
$ ./ansible_graph.py --help

# run application
$ ./ansible_graph.py <project> <configuration>