Split debug msg on multilines

Hi,

I have created my debug msg task as such

`

  • name: Print VM Info
    debug:
    msg: “VM Info: {{ vm_created | to_nice_yaml(indent=8) }}”

`

but the result doesn’t show the text on multilines

`

TASK [Print VM Info] ********************************************************************************************************************************************************************************************************************************************
ok: [localhost] => {
“msg”: "VM Info: changed: true\nfailed: false\nid: 94907080-18d2-49e0-85af-d0646c9ce0d2\nopenstack:\n OS-DCF:diskConfig: MANUAL\n

`

How can I replace “\n” with new line ?

Regards,

Charles

Ansible is not a reporting tool so it have limited option included.
You can try this:

- name: Print VM Info
   debug:
     var: vm_created

it will give a more human readable format.

If that is not to satisfaction you would need to write your own callback plugin or try one of the included ones
https://docs.ansible.com/ansible/devel/plugins/callback.html#plugin-list