- 1 year ago
Ansible reboot without Shutdown Event Tracker windows
To perform a reboot without the Shutdown Event Tracker on Windows using Ansible, you can use the win_reboot
module with the shutdown_event_tracker
parameter set to false
. Here's an example playbook:
yaml- name: Reboot without Shutdown Event Tracker
hosts: your_windows_hosts
tasks:
- name: Reboot the Windows machine
win_reboot:
shutdown_event_tracker: false
In this example, replace your_windows_hosts
with the appropriate host or host group where you want to perform the reboot. The win_reboot
module is used to initiate the reboot, and the shutdown_event_tracker
parameter is set to false
to disable the Shutdown Event Tracker.
You can run this playbook using the ansible-playbook
command:
ansible-playbook your_playbook.yml
Ensure that you have the necessary privileges to perform a reboot on the target Windows machines. Additionally, test this playbook in a controlled environment before applying it to production systems to ensure it meets your requirements and doesn't have any unintended consequences.