title: How can I add new line "\n" character to Ansible variable
body: <p>How can I add new line "\n" characters to Ansible variable <code>mailbody</code> </p>
  
  <p>I set the below variable to ansible's mail module body attribute.</p>
  
  <pre><code>   - set_fact:
         mailbody: "{{ mailbody | default('') + 'PROFILE_NAME:' +  PROFILE_NAME ~ '\n\nSERVER_NAME:' + SERVER_NAME ~ '\n\nNODE_NAME:' +  NODE_NAME ~ '\n\n\n\n' }}"
  </code></pre>
  
  <p>But the body of the email has '\n\n' printed instead of <code>new lines</code>. </p>
  
  <p>Can you please suggest what changes are needed?</p>