ansibank

command module
v0.0.0-...-d4864d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2021 License: MIT Imports: 8 Imported by: 0

README

ansibank

Ever find yourself wishing you could review the output from a playbook you ran a few weeks ago?

... Well, now you can!

Demo Rendering by asciinema and asciicast2gif

Description

ansibank is a drop-in replacement for ansible-playbook that preserves your playbook output.

ansibank streams your ansible-playbook output as you would expect, while writing it to a local SQLite database upon completion. AWX/Tower are nifty because they store playbook output for later review - this project seeks to CLI-ify output preservation in a way that is closer to typical ansible-playbook usage.

Usage

Build

Simply clone this repository and run go install .. Ansibank can then be accessed via ansibank.

Running Playbook

Run your playbook as you would ansible-playbook, but replaced with ansibank.

For example:

ansible-playbook -e SOME_VAR=test my-playbook.yml

Would become:

ansibank -e SOME_VAR=test my-playbook.yml

The only caveat is that the code currently assumes your playbook path is the last argument to ansibank. Note that the playbook path, as with ansible-playbook, does not need to be an absolute path.

Viewing Output

Run ansibank list from the directory containing your database and select the desired playbook run.

TODO

  • Currently, playbook runs are identified by the playbook path (realpathed). If you move your playbook to a different location, it would be helpful to be able to reflect that in the database. The thought is to provide a move command here.
  • The Ansibank DB is created in the directory from where you run ansibank, with the name ansibank-db. Making this configurable would be nice.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package db provides helper functionality for interacting with the database.
Package db provides helper functionality for interacting with the database.
Package playbook provides helper functionality for running Ansible playbooks.
Package playbook provides helper functionality for running Ansible playbooks.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL