mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
win_updates: action plugin-ify it (#33216)
* converted win_updates to an action plugin for automatic reboots * do not set final result when running under async * Updated documentation around win_updates with async and become
This commit is contained in:
@@ -267,15 +267,15 @@ foreach ($update in $updates_to_install) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($update_fail_count -gt 0) {
|
||||
Fail-Json -obj $result -msg "Failed to install one or more updates"
|
||||
}
|
||||
|
||||
Write-DebugLog -msg "Performing post-install reboot requirement check..."
|
||||
$result.reboot_required = Get-RebootStatus
|
||||
$result.installed_update_count = $update_success_count
|
||||
$result.failed_update_count = $update_fail_count
|
||||
|
||||
if ($update_fail_count -gt 0) {
|
||||
Fail-Json -obj $result -msg "Failed to install one or more updates"
|
||||
}
|
||||
|
||||
Write-DebugLog -msg "Return value:`r`n$(ConvertTo-Json -InputObject $result -Depth 99)"
|
||||
|
||||
Exit-Json $result
|
||||
|
||||
Reference in New Issue
Block a user