use stdout_callback to make ansible errors human readable #293
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ansible's stdout defaults to a very dense, minimal format that is not particularly readoable. (e.g. giant blob of multiline json)
As of ansible 2.5, a human readable callback plugin (
yaml
) is built-in, and can be specified in ansible.cfg viastdout_callback = yaml
.Potential other options are
unixy
,dense
, ordebug
. A full list can be found here: https://docs.ansible.com/ansible/latest/collections/callback_index_stdout.htmlFor more examples, see this blog post:
https://www.jeffgeerling.com/blog/2018/use-ansibles-yaml-callback-plugin-better-cli-experience