Replace list placeholder with Ansible
I can't reproduce your problem in Linux and ansible [core 2.11.6]
with python version = 3.8.5
and jinja version = 3.0.1
. Try explicit conversion to string. The template below
---
test:
config: {{ prop.resolveme }}
config: {{ prop.resolveme|map('string') }}
gives
---
test:
config: ['8.8.8.8', '1.1.1.1', '192.168.0.1']
config: ['8.8.8.8', '1.1.1.1', '192.168.0.1']
If this does not help you can try brute-force
---
test:
config: [{% for i in prop.resolveme %}'{{ "%s"|format(i) }}'{% if not loop.last %}, {% endif%}{% endfor %}]