How to loop var number of times with Ansible 2.5

Hi,

Just looking over the new looping documentation for Ansible 2.5 and I’m not sure how to loop a var number of times. It seems that everything now needs to be a list that is fed into loop. We used to be able to run

“with_sequence: count=var”

To loop var number of times. Is there any easy way to do this with the new schema?

Thanks,
Dave

You can still use the with_sequence, it's not going away anytime soon and hopefully it will never go away because the new way is horrendous to type.

  with_sequence: count={{ var }}

equivalent with loop:

  loop: "{{ lookup('sequence', 'count=' + var | string) | list }}"