Variable syntax warning in ansible 1.4.1

All my playbook runs are now emitting this warning at the start:

[WARNING]: It is unneccessary to use ‘{{’ in loops, leave variables in loop

expressions bare.

However, my playbook is quite large, and includes several roles for several classes of servers, so I have no idea which play or template is causing this warning to be issued. I’ve tried adding -vvv to ansible-playbook, but it doesn’t give me any more information. How can I figure out what is causing this warning?

Anand

You can narrow it down by grepping for “with_items”, perhaps? Or other with_ loop keywords? You maybe have something like this:

with_items: “{{ mythings }}”

This just needs to be:

with_items: mythings

-Tim

Timothy, thank you! That was exactly my issue. I had one task where the with_items: had a variable name surrounded by braces. I removed them and the warning went away.

Anand