-
Notifications
You must be signed in to change notification settings - Fork 2
Ansible call graph
Since our playbooks are big and complex, it would be very helpful to be able to automatically generate visualizations of the relationships between the various components.
- ansible-roles-graph seems incredibly basic and didn't work.
- ARA looks like an awesome tool, but it doesn't generate graphs. It also relies on run-time analysis, which has both pros and cons vs. static analysis.
- ansigenome does lots of things we probably don't need, and also does graphing, but not very well (and it didn't work at all when @aspiers tried it).
Was marked as a dead project, but nevertheless seems to be reasonably sophisticated - even has a test suite! @aspiers has revived this by fixing a load of bugs, adding a few enhancements, and taking over maintainership.
Here is a very cryptic HOWTO:
zypper in ruby2.1-rubygem-bundler
git clone https://github.com/aspiers/ansible-viz
cd ansible-viz/
bundle
bundle exec ruby ansible-viz.rb ~/ardana-dev-tools/ansible
This will generate viz.html
in the current directory. You then need
to serve this and also viz.js
from some webserver, and then browse
to the generated HTML page.
The most important one is that it doesn't handle roles with no tasks, but see https://github.com/aspiers/ansible-viz/issues/ for the full list.
Here is some example output created when running on the ardana-dev-tools
repository:
There are more examples from the same place.
-
Run on the huge deployer Ansible codebase:
bundle exec ruby ansible-viz.rb ~/scratch/ansible/next/ardana/ansible
-
Submit all the code changes and issues found upstream.