# ans-host-reboot

**URL:** <https://forum.ansible.com/t/ans-host-reboot/11402>\
**Category:** Ansible Project\
**Created:** [April 10, 2012, 7:51pm UTC](https://forum.ansible.com/t/ans-host-reboot/11402 "2012-04-10T19:51:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seth\_Vidal](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@Seth\_Vidal](https://forum.ansible.com/u/Seth_Vidal)\
**Post date:** [April 10, 2012, 7:51pm UTC](https://forum.ansible.com/t/ans-host-reboot/11402/1 "2012-04-10T19:51:13Z")

</div>

This is a port of a script I wrote originally for func.

[http://skvidal.fedorapeople.org/misc/ans-host-reboot.py](http://skvidal.fedorapeople.org/misc/ans-host-reboot.py)

It lets you specify hosts to reboot - either altogether or  
one-at-a-time. It checks for the host to return to functionality before  
exiting.

uses:  
- reboot-a-thon for outages for new kernels - where you want to do them  
&nbsp;&nbsp;&nbsp;all but not be tied down by watching them all.

- rebooting a class of hosts that provide the same service so not all  
&nbsp;&nbsp;&nbsp;of them will be down at once (--one-at-a-time)

It's an example of my noodling around and it is a pretty handy script  
when I have to do mass updates/reboot events.

-sv

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [April 11, 2012, 1:32am UTC](https://forum.ansible.com/t/ans-host-reboot/11402/2 "2012-04-11T01:32:06Z")

</div>

Thanks Seth!

Just to let everyone know, this is now available in the ansible-contrib repo.

If others have scripts, playbooks, or modules to share, we’ve got a place for them!

[https://github.com/ansible/ansible-contrib](https://github.com/ansible/ansible-contrib)

–Michael
