Member-only story

Reboot remote hosts — Ansible module reboot

How to reboot remote hosts with Ansible specifying the notification message to logged users, the delay seconds, and the verification command. Live demo and fun included.

Luca Berton
4 min readSep 10, 2021

How to reboot remote hosts with Ansible?

I’m going to show you a live demo with some simple Ansible code.

I’m Luca Berton and welcome to today’s episode of Ansible Pilot.

Ansible reboot remote hosts

Today we’re talking about the Ansible module reboot.

The full name is ansible.builtin.reboot which means is part of the collection of modules “builtin” with ansible and shipped with `ansible-core`.

This module is pretty stable and out for years and supports a large variety of operating systems.

The purpose is to reboot a remote machine, wait for it to go down, come back up, and respond to commands.

For Windows targets, use the `ansible.windows.win_reboot` module instead.

Parameters

  • reboot_timeout integer — 600

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday

No responses yet