On 30. juli 2016 23:52, a akin wrote:
> Thank you for the quick response. I think I got the error to go away but I
> m facing a different issue now; I am using debug/msg to print the value of
> the variable and for some reason a newline character is being appended, for
> example, instead of just 'subnet1', I get 'subnet1\n'. Adding
> '#jinja2:trim_blocks: True, lstrip_blocks: True' doesn't help.
Most likely a bug, I haven't seen this problem with the template module.
As a workaround you can use the trim filter in Ansible.
group_id: "{{ lookup('template', 'sec_grp.j2') | trim }}"
--
Kai Stian Olstad