# Playbook to reboot the machine infinite times

**URL:** <https://forum.ansible.com/t/playbook-to-reboot-the-machine-infinite-times/32707>\
**Category:** Ansible Project\
**Created:** [April 17, 2020, 5:37am UTC](https://forum.ansible.com/t/playbook-to-reboot-the-machine-infinite-times/32707 "2020-04-17T05:37:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pavan\_Nr](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@Pavan\_Nr](https://forum.ansible.com/u/Pavan_Nr)\
**Post date:** [April 17, 2020, 5:37am UTC](https://forum.ansible.com/t/playbook-to-reboot-the-machine-infinite-times/32707/1 "2020-04-17T05:37:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Srinivas\_Naram](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@Srinivas\_Naram](https://forum.ansible.com/u/Srinivas_Naram)\
**Post date:** [April 17, 2020, 5:45am UTC](https://forum.ansible.com/t/playbook-to-reboot-the-machine-infinite-times/32707/2 "2020-04-17T05:45:19Z")

</div>

Did you try using items ?

---

<div class="post-metadata">

**Author:** ![Pavan\_Nr](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@Pavan\_Nr](https://forum.ansible.com/u/Pavan_Nr)\
**Post date:** [April 17, 2020, 7:30am UTC](https://forum.ansible.com/t/playbook-to-reboot-the-machine-infinite-times/32707/3 "2020-04-17T07:30:38Z")

</div>

Hi Srinivas,

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

regards,  
Pavan

---

<div class="post-metadata">

**Author:** ![Srinivas\_Naram](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@Srinivas\_Naram](https://forum.ansible.com/u/Srinivas_Naram)\
**Post date:** [April 17, 2020, 9:42am UTC](https://forum.ansible.com/t/playbook-to-reboot-the-machine-infinite-times/32707/4 "2020-04-17T09:42:17Z")

</div>

[https://docs.ansible.com/ansible/latest/plugins/lookup/items.html](https://docs.ansible.com/ansible/latest/plugins/lookup/items.html)
