Playbook to reboot the machine infinite times

Hi,

Need help to create playbook, server need to reboot over night in loop, like 100 time’s I need to reboot and It should stop and collect the event viewer logs.

Do we have module already?

Thanks,
Pavan

Did you try using items ?

Hi Srinivas,

i have not tried , can you share the links if possible.

regards,
Pavan

https://docs.ansible.com/ansible/latest/plugins/lookup/items.html