Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win_hotfix module fails to install cumulative update for Windows 11 #570

Open
yadihng opened this issue Jul 5, 2024 · 1 comment
Open

Comments

@yadihng
Copy link

yadihng commented Jul 5, 2024

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
  • Bug Report
COMPONENT NAME

win_hotfix module

ANSIBLE VERSION
ansible 2.9.9
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/var/lib/shade/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.7.3 (default, Oct 11 2023, 09:51:27) [GCC 8.3.0]
COLLECTION VERSION

CONFIGURATION

OS / ENVIRONMENT

Windows 11 23H2

STEPS TO REPRODUCE
---

- name: Install hotfix
  hosts: MyTargetHost
  gather_facts: True

  tasks:
  - name: Install Windows 11 Hotfix
    win_hotfix:
      source: C:\hotfix\windows11.0-kb5039212-x64_2b67855a5e73c7a873e6bdca512c8c106b429196.msu
      state: present
    register: hotfix_install
EXPECTED RESULTS

I expect the hotfix to be installed.

ACTUAL RESULTS
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
}
@yadihng yadihng changed the title Win_hotfix module failing to install cumulative update for Windows 11 Win_hotfix module fails to install cumulative update for Windows 11 Jul 5, 2024
@hiyokotaisa
Copy link
Contributor

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

https://support.microsoft.com/en-us/topic/description-of-the-windows-update-standalone-installer-in-windows-799ba3df-ec7e-b05e-ee13-1cdae8f23b19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants