I'm trying to loop over a simple list of strings & insert each of them into an ansible jinja template, but when looping over the variable in the template file, I get
AnsibleUndefinedVariable: 'item' is undefined
-- vars.yml
services:
- "service 1"
- "service 2"
-- main.yml
win_template:
with_items: "{{ services }}"
-- jinja template
(% for item in services %)
{{ item }}
(% endfor %)
question from:https://stackoverflow.com/questions/65942219/jinja-ansible-flat-array-template-loop