Also, you can override jinja2 settings by adding a special header to template file. i.e. #jinja2:variable_start_string:‘[%’ , variable_end_string:‘%]’, trim_blocks: False which changes the variable interpolation markers to [% var %] instead of {{ var }}.
However, I cannot seem to get this to work.
I always get this error:
template error while templating string: unexpected ‘.’.
that you set those settings for that specific template, will not
affect Ansible's templating itself, so the with_ will use normal
templating BEFORE passing all the info to the template module which
will then make those settings effective on the template supplied, but
not to any other part of the task.