Ansible – Print message – debug: msg=”line1 \n {{ var2 }} \n line3 with var3 = {{ var3 }}”


In Ansible (1.9.4) or 2.0.0

I ran the following action:

$ cat roles/setup_jenkins_slave/tasks/main.yml

But this is not printing the variable with new lines (for the 3rd debug action)?


As a workaround, I used with_items and it kind of worked for me.

Leave a Reply