Member-only story

Reboot Windows hosts — Ansible module win_reboot

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

Luca Berton
4 min readSep 28, 2021

How to reboot remote Windows 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 Windows hosts

Today we’re talking about Ansible module win_reboot.
The full name is `ansible.windows.win_reboot` which means is part of the `ansible.windows collection` collection to target Windows host.
The purpose is to reboot a Windows machine, wait for it to go down, come back up, and respond to commands.
For non-Windows targets, use the `ansible.builtin.reboot` module instead.
Please note that the connection user must have the `SeRemoteShutdownPrivilege` Windows privilege enabled.

Parameters

  • reboot_timeout float — 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