Try *yaml* callback https://docs.ansible.com/ansible/latest/collections/community/general/yaml_callback.html
For example, the playbook
shell> cat pb.yml
- hosts: localhost
vars:
result:
stdout: |
line1
line2
line3
tasks:
- debug:
var: result.stdout
gives (abridged)
shell> ANSIBLE_STDOUT_CALLBACK=yaml ansible-playbook pb.yml
ok: [localhost] =>
result.stdout: |-
line1
line2
line3
--
Vladimir Botka
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/20220709164531.3ae79954%40gmail.com.
pgpLx5T2XXbx1.pgp
Description: OpenPGP digital signature
