Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sgaunet/ansible-summary
ansible-summary is a tool to make a summary of the states of ansible tasks.
https://github.com/sgaunet/ansible-summary
Last synced: 14 days ago
JSON representation
ansible-summary is a tool to make a summary of the states of ansible tasks.
- Host: GitHub
- URL: https://github.com/sgaunet/ansible-summary
- Owner: sgaunet
- License: mit
- Created: 2023-05-23T06:35:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-01T19:27:40.000Z (9 months ago)
- Last Synced: 2024-04-01T20:34:25.157Z (9 months ago)
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Go Report Card](https://goreportcard.com/badge/github.com/sgaunet/ansible-summary)](https://goreportcard.com/report/github.com/sgaunet/ansible-summary)
ansible-summary is a tool to make a summary of the states of ansible tasks. I'm using it to get a report of how many tasks are in chaged state, ok, failures...
The input of the file is the JSON log of ansible.
# Getting started
Execute your playbook:
Set var env to configure ansible to write a json file:
```
export ANSIBLE_CALLBACKS_ENABLED=json
export ANSIBLE_STDOUT_CALLBACK=json
```And finaly get, the resue:
```
ansible-summary -input $TMPFILE
```Example output:
```
$ export ANSIBLE_CALLBACKS_ENABLED=json
$ export ANSIBLE_STDOUT_CALLBACK=json
$ ansible-playbook -i inventories/yinventory playbook.yml --check --diff > /tmp//res.json
$ ansible-summary -input /tmp/res.json
Tasks not synchronised :
On Host prod_WWW task system/repositories : Configure yu repositories
On Host prod_WWW task website : install website
************************************
prod_WWW ok=229 changed=2 unreachable=0 failures=0 skipped=64 rescued=0 ignored=0
```# Development
This project is using :
* golang 1.20+
* [task for development](https://taskfile.dev/#/)
* [goreleaser](https://goreleaser.com/)