win_pending_reboot

win_pending_reboot - Checks for pending Windows Reboots

Synopsis

  • This Ansible module examines three specific registry locations where a Windows Server might indicate that a reboot is pending.

Parameters

Parameter Choices/Defaults Comments
skip_component_based_servicing
boolean
Choices:
  • no ←
  • yes
Specifies whether to skip reboots triggered by the Component-Based Servicing component
skip_windows_update
boolean
Choices:
  • no ←
  • yes
Specifies whether to skip reboots triggered by Windows Update
skip_pending_file_rename
boolean
Choices:
  • no ←
  • yes
Specifies whether to skip pending file rename reboots
skip_pending_computer_rename
boolean
Choices:
  • no ←
  • yes
Specifies whether to skip reboots triggered by a pending computer rename
skip_ccm_client_sdk
boolean
Choices:
  • no
  • yes ←
Specifies whether to skip reboots triggered by the ConfigMgr client

Examples

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

Return Values

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

Notes

Authors

  • Stéphane Bilqué (@sbilque)

License

This project is licensed under the MIT License.

See LICENSE to see the full text.

About

Checks for pending Windows Reboots

Install
ansible-galaxy install informatique-cdc/ansible-role-win_pending_reboot
GitHub repository
License
mit
Downloads
7274
Owner
Informatique CDC, subsidiary of Group Caisse des Dépôts is a key player in IT services and digital trust.