- This Ansible module examines three specific registry locations where a Windows Server might indicate that a reboot is pending.
Parameter | Choices/Defaults | Comments |
---|---|---|
skip_component_based_servicing boolean |
Choices:
|
Specifies whether to skip reboots triggered by the Component-Based Servicing component |
skip_windows_update boolean |
Choices:
|
Specifies whether to skip reboots triggered by Windows Update |
skip_pending_file_rename boolean |
Choices:
|
Specifies whether to skip pending file rename reboots |
skip_pending_computer_rename boolean |
Choices:
|
Specifies whether to skip reboots triggered by a pending computer rename |
skip_ccm_client_sdk boolean |
Choices:
|
Specifies whether to skip reboots triggered by the ConfigMgr client |
---
- hosts: localhost
roles:
- win_pending_reboot
tasks:
- name: get the pending reboot status
win_pending_reboot:
skip_ccm_client_sdk: no
register: test_pending_reboot_result
- name: reboot if need
win_reboot:
when: test_pending_reboot_result.reboot_required
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
component_based_servicing boolean |
success | True when the Component-Based Servicing component requested a reboot.Sample: False |
windows_update boolean |
success | True when the Windows Update requested a reboot.Sample: False |
pending_file_rename boolean |
success | True when a pending file rename triggered a reboot.Sample: False |
pending_computer_rename boolean |
success | True when a pending computer rename triggered a reboot.Sample: False |
ccm_client_sdk boolean |
success and skip_ccm_client_sdk = no |
True when the ConfigMgr client triggered a reboot.Sample: False |
reboot_required boolean |
success | True when the target server requires a reboot.Sample: True |
- This module uses some partial or full parts of open source functions in PowerShell from the following source.
- xPendingReboot https://github.com/PowerShell/xPendingReboot.git
- ansible-windows-pending-reboot https://github.com/valerius257/ansible-windows-pending-reboot
- Stéphane Bilqué (@sbilque)
This project is licensed under the MIT License.
See LICENSE to see the full text.