Hi,
I am new to ansible and new to the form.
I am wondering how to loop through a template
my template looks like this
{ item.sitename }}-test,{{ item.sitename }} description
and my variables look like this
---
parameters:
- { sitename: testsite1 }
- { sitename: testsite2 }
my Task looks like this
---
- name: Lines Templates
template: src=test.j2 dest=../ansible/configurations/test.csv
with_items: "{{ parameters }}"
this works but I only get the one line of the last entry with looks like this
testsite2-test,testsite2 description
But what I am tring to get is this
testsite1-test,testsite1 description
testsite2-test,testsite2 description
I have been looking and reading the Jinga2 Templates doc but truble finding which {% for in %} to use
if some one could point me to the right direction that would be great.
Jeff