When I run a playbook to install a Windows Cumulative Update for Windows 11 using the 'win_hotfix' module, it errors out stating "failed to get metadata xml inside MSU file, cannot get hotfix metadata required for this task".
In fact, when I expand the MSU (expand.exe -F:* ".\windows11.0-kb5039212-x64_2b67855a5e73c7a873e6bdca512c8c106b429196.msu" .), there's no xml file.
Using module file /usr/lib/python3/dist-packages/ansible/modules/windows/win_hotfix.ps1
Pipelining is enabled.
<MyTargetHost> ESTABLISH WINRM CONNECTION FOR USER: USER on PORT 5985 TO MyTargetHost
EXEC (via pipeline wrapper)
fatal: [MyTargetHost]: FAILED! => {
"changed": false,
"msg": "failed to get metadata xml inside MSU file, cannot get hotfix metadata required for this task",
"reboot_required": false
}
Basically, this is not Ansible issue. MSU needs to have xml file so if there is no xml in the package, that need to be fixed on the package provider(Microsoft).
SUMMARY
When I run a playbook to install a Windows Cumulative Update for Windows 11 using the 'win_hotfix' module, it errors out stating "failed to get metadata xml inside MSU file, cannot get hotfix metadata required for this task".
In fact, when I expand the MSU (expand.exe -F:* ".\windows11.0-kb5039212-x64_2b67855a5e73c7a873e6bdca512c8c106b429196.msu" .), there's no xml file.
ISSUE TYPE
COMPONENT NAME
win_hotfix module
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Windows 11 23H2
STEPS TO REPRODUCE
EXPECTED RESULTS
I expect the hotfix to be installed.
ACTUAL RESULTS