Version 3.2
This commit is contained in:
@@ -20,9 +20,7 @@
|
|||||||
- name: Reboot if required
|
- name: Reboot if required
|
||||||
ansible.windows.win_powershell:
|
ansible.windows.win_powershell:
|
||||||
script: |
|
script: |
|
||||||
if (Get-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot | Where-Object { $_.IsDownloaded -and $_.IsInstalled -eq $false }) {
|
|
||||||
Restart-Computer -Force
|
Restart-Computer -Force
|
||||||
}
|
|
||||||
async: 1
|
async: 1
|
||||||
poll: 0
|
poll: 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user