use item in a template

cat main.yml

`

As an update the problem seem to be somewhere in the template module as it shows the same error even after I remove the variable item from the jinja2 template

`

It seems as though your with_items on your template task is indented too far. It should be indented to the same level as the word template. Just like you have it for your debug command.

Hi Matt,

Yes, that was it. Thanks for the help.