ChameleonCloud / chi-in-a-box

Packaging the systems and operations of the Chameleon testbed
Apache License 2.0
14 stars 10 forks source link

use stdout_callback to make ansible errors human readable #293

Closed msherman64 closed 2 months ago

msherman64 commented 2 months ago

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 via stdout_callback = yaml.

Potential other options are unixy, dense, or debug. A full list can be found here: https://docs.ansible.com/ansible/latest/collections/callback_index_stdout.html

For more examples, see this blog post: https://www.jeffgeerling.com/blog/2018/use-ansibles-yaml-callback-plugin-better-cli-experience

msherman64 commented 2 months ago

Is ansible 2.5+ by default the version that is used in chi-in-a-box? when I tried this flag on dev-in-a-box, it did fix the weird yaml error output

Yes https://github.com/ChameleonCloud/chi-in-a-box/blob/5d56744eb534d82506cdfecfd1a7e645437c5660/requirements.txt#L4

xena is using >= 2.10