Ansible Loops
You can use the for statement in Jinja2 to loop over items in a list, range, etc. For example, the following for loop will iterate over the numbers in the range(1,11) and will hence display the numbers from 1->10:
{% for i in range(1,11) %}
Number {{ i }}
{% endfor %}