I added a script to ansible/files/scripts/ansilog-playbook.py so that
we can easily view ansible-playbook log files. It's not installed on
batcave atm, due to the freeze, and you'll need to be able to view the
ansible-playbook log files to run it (so root only).
One of the problems we've all had is running a playbook and seeing
failures, but then them flying off the screen ... now you can run:
ansilog-playbook.py info --user=. --status=failed --one
...and it'll show just the tasks that failed from the last playbook
that you ran.
You can add --json to get the json data from the failed tasks.
Also if you have something, like the check-etc.yml playbook, that
generates data then you can get just the data by running something
like:
ansilog-playbook.py json --user=. --status=ok -1 \
--play check-etc '*' 'Report*' \
| jq .results[].msg \
| sed 's/"UNKNOWN File: \(- .*\)"/\1/' \
| sort -V | uniq | less