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.
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