I am running a for lo0p in creating file via ansible template.
If I hard code my loop count everything works fine.
> {% for x in range(0,3) %}
> Value of x is : {{x}}
> {% endfor %}
But as I give dinamic value it gives error
> {% for x in range(0,{{count}}) %}
> Value of x is : {{x}}
> {% endfor %}
fatal: [localhost] => {'msg': "file: ~/playbook.yml, line number: 23,
error: expected token ':', got '}'", 'failed': True},
Any suggestion please.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/e18064c1-dfc0-45d9-b496-588694eae3c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.