This article describes how to troubleshoot Jinja script output having multiple \n when running a playbook.
Table of Contents
Scope
FortiSOAR v7.
Sample output
Jinja script output that shows multiple ‘\n’.
Jinja Script
{% set varA = 255 %}
{% set varB = 192 %}
{% set varC = 'AB' %}
{{ varC }}
Output
This is due to a syntax error in the Jinja script (missing ‘-‘).
Solution
Add ‘-‘ at the end of each ‘%’ to become ‘-%’.
Jinja Script:
{% set varA = 255 -%}
{% set varB = 192 -%}
{% set varC = 'AB' -%}
{{ varC }}