Closed basictheprogram closed 7 years ago
What is in C:\temp\ansible_win_updates.log ? Are you running the module as Administrator?
cc @nitzmahone click here for bot help
Yes, running as Administrator.
2017-08-29 14:26:21Z Arguments: System.Collections.Hashtable | out-string
2017-08-29 14:26:21Z OS Version:
Major Minor Build Revision
----- ----- ----- --------
6 1 7601 65536
2017-08-29 14:26:21Z Running as user: G01616B\Administrator
2017-08-29 14:26:21Z Powershell version:
Name Value
---- -----
PSVersion 5.1.14409.1012
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.14409.1012}
BuildVersion 10.0.14409.1012
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
2017-08-29 14:26:21Z Starting scheduled job with args:
Name Value
---- -----
_ansible_debug False
_ansible_version 2.4.0
_ansible_diff False
_ansible_check_mode False
_ansible_syslog_facility LOG_USER
_ansible_selinux_special_fs {fuse, nfs, vboxsf, ramfs, 9p}
_ansible_module_name win_updates
category_names {SecurityUpdates, CriticalUpdates, UpdateRollups}
_ansible_no_log False
log_path C:\temp\ansible_win_updates.log
_ansible_socket
_ansible_verbosity 4
2017-08-29 14:26:21Z Registering scheduled job with args
Name Value
---- -----
ScheduledJobOption {StopIfGoingOnBatteries, RunElevated, StartIfOnBatteries}
ArgumentList {System.Collections.Hashtable}
InitializationScript ...
Name ansible-win-updates
ScriptBlock ...
ErrorAction Stop
2017-08-29 14:26:21Z Starting scheduled job (PS4 method)
2017-08-29 14:26:21Z Waiting for job completion...
2017-08-29 14:26:23Z Scheduled job started with boundparms
Name Value
---- -----
_ansible_debug False
_ansible_version 2.4.0
_ansible_diff False
_ansible_syslog_facility LOG_USER
_ansible_check_mode False
_ansible_selinux_special_fs {fuse, nfs, vboxsf, ramfs, 9p}
_ansible_module_name win_updates
category_names {SecurityUpdates, CriticalUpdates, UpdateRoll...
_ansible_no_log False
log_path C:\temp\ansible_win_updates.log
_ansible_socket
_ansible_verbosity 4
and unboundargs
2017-08-29 14:26:23Z Creating Windows Update session...
2017-08-29 14:26:23Z Create Windows Update searcher...
2017-08-29 14:26:24Z Search criteria: (IsInstalled = 0 AND CategoryIDs contains '0FA1201D-4330-4FA8-8AE9-B877473B6441') OR (IsInstalled = 0 AND CategoryIDs contains 'E6CF1350-C01B-414D-A61F-263D14D133B4') OR (IsInstalled = 0 AND CategoryIDs contains '28BC880E-0592-4CBF-8F95-C79B17911D5F')
2017-08-29 14:26:24Z Searching for updates to install in category IDs 0FA1201D-4330-4FA8-8AE9-B877473B6441 E6CF1350-C01B-414D-A61F-263D14D133B4 28BC880E-0592-4CBF-8F95-C79B17911D5F...
2017-08-29 14:26:24Z Fatal exception: Exception from HRESULT: 0x8024402C at at DoWindowsUpdate, <No file>: line 72
at <ScriptBlock>, <No file>: line 222
2017-08-29 14:26:25Z Scheduled job completed with output:
Name Value
---- -----
error Exception from HRESULT: 0x8024402C
location at DoWindowsUpdate, <No file>: line 72...
failed True
You can also check the WSUS update log itself at C:\Windows\WindowsUpdate.log
I believe. There's a few issues floating around regarding WSUS, just go a quick google search for WSUS 0x8024402C
and there are a few pages that might help you.
I'd also recommend just retrying a few times, especially if you have lots of pending windows updates to apply.
I'm going to close the issue as this is unrelated to Ansible and is an issue with Windows Update itself. There is nothing we can do about these errors and needs to be fixed on the Microsoft side.
The problem was with WSUS server (as hypothesized) and a value in the registry. This play fixes the windows problem. Documenting it here in case someone else has this problem and find this issue
- name: UseWUServer
win_regedit:
path: HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindwsUpdate\AU
name: UseWUServer
dword: 0
ISSUE TYPE
COMPONENT NAME
win_updates
ANSIBLE VERSION
CONFIGURATION
Default git clone of devel branch
OS / ENVIRONMENT
Management host macOS 10.12.6 Managed hosts Windows 7
SUMMARY
Using win_updates to patch Windows and I receive an error "Exception from HRESULT: 0x8024402C"
STEPS TO REPRODUCE
EXPECTED RESULTS
Windows Updates for the listed categories would be installed.
ACTUAL RESULTS
Doing Window Updates via the UI works as expected.