Pretty-print Ansible log messages as YAML

This causes Ansible to default to formatting its output messages as
pretty-printed YAML rather than one-line JSON blobs. In particular, makes
multi-line outputs in error messages (e.g. stack traces) extremely easy to
read.

Change-Id: Ifcc08c74a8170d664d58ac8b1086a12559ca77e5
This commit is contained in:
Jonathan Heathcote 2025-01-30 12:28:11 +00:00
parent caf2442fd4
commit 772da0bf3c

View File

@ -57,3 +57,5 @@ export ANSIBLE_FORCE_HANDLERS="${ANSIBLE_FORCE_HANDLERS:-True}"
export ANSIBLE_PYTHON_INTERPRETER="${ANSIBLE_PYTHON_INTERPRETER:-OSA_ANSIBLE_PYTHON_INTERPRETER}"
export ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS="${ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS:-ignore}"
export ANSIBLE_CALLBACK_RESULT_FORMAT="${ANSIBLE_CALLBACK_RESULT_FORMAT:-yaml}"