Home
Join

4 Replies

  • What is the actual error you are getting from Ansible (if you run Ansible in verbose mode)?

    You might be able to use the state attribute. If the search finds anything, it may then look at its state to see if it is installed or not based on the search. Wiki link and reference below: 

    https://docs.ansible.com/ansible/2.5/modules/win_updates_module.html

    Text
    state
    
    Choices:
    installed ←
    searched
    
    Controls whether found updates are returned as a list or actually installed.
    This module also supports Ansible check mode, which has the same effect as setting state=searched
    

    The only other thing I can think of is running a play that does the search for the updates, putting the results into a register, and then using another play to reference the registered results checking if their state is installed. 

    Was this post helpful? thumb_up thumb_down
  • When running in verbos mode I get the below

    The full traceback is:
    Exception from HRESULT: 0x80072EE2
    At line:503 char:21
    +                   throw $exp
    +                   ~~~~~~~~~~
        + CategoryInfo         : OperationStopped: (:) [], COMException
        + FullyQualifiedErrorId : Exception from HRESULT: 0x80072EE2



    at Invoke-AsyncMethod, <No file>: line 503
    at <ScriptBlock>, <No file>: line 735
    fatal: [SERVER NAME]: FAILED! => {
        "changed": false,
        "failed_update_count": 0,
        "filtered_updates": [],
        "found_update_count": 0,
        "installed_update_count": 0,
        "invocation": {
            "module_args": {
                "accept_list": null,
                "category_names": [
                    "SecurityUpdates",
                    "CriticalUpdates"
                ],
                "log_path": null,
                "reboot": false,
                "reboot_timeout": 1200,
                "reject_list": null,
                "server_selection": "windows_update",
                "skip_optional": false,
                "state": "installed",
                "use_scheduled_task": false
            }
        },
        "msg": "Searching for updates: Exception from HRESULT: 0x80072EE2 - Unknown WUA HRESULT 2147954402 (UNKNOWN 80072EE2)",
        "reboot_required": false,
        "updates": []
    }
    <SERVERNAME> Received final progress result from update task
    EXEC (via pipeline wrapper)
    The full traceback is:
    Exception from HRESULT: 0x80072EE2
    At line:503 char:21
    +                   throw $exp
    +                   ~~~~~~~~~~
        + CategoryInfo         : OperationStopped: (:) [], COMException
        + FullyQualifiedErrorId : Exception from HRESULT: 0x80072EE2



    at Invoke-AsyncMethod, <No file>: line 503
    at <ScriptBlock>, <No file>: line 735
    fatal: [SERVERNAME]: FAILED! => {
        "changed": false,
        "failed_update_count": 0,
        "filtered_updates": [],
        "found_update_count": 0,
        "installed_update_count": 0,
        "invocation": {
            "module_args": {
                "accept_list": null,
                "category_names": [
                    "SecurityUpdates",
                    "CriticalUpdates"
                ],
                "log_path": null,
                "reboot": false,
                "reboot_timeout": 1200,
                "reject_list": null,
                "server_selection": "windows_update",
                "skip_optional": false,
                "state": "installed",
                "use_scheduled_task": false
            }
        },
        "msg": "Searching for updates: Exception from HRESULT: 0x80072EE2 - Unknown WUA HRESULT 2147954402 (UNKNOWN 80072EE2)",
        "reboot_required": false,
        "updates": []
    }

    Was this post helpful? thumb_up thumb_down
  • It looks like the Windows OS is passing back the following error to Ansible:

    Text
    Searching for updates: Exception from HRESULT: 0x80072EE2 - Unknown WUA HRESULT 2147954402 (UNKNOWN 80072EE2)
    

    I would recommend tracking down that error to see if it gives any clues. Some other questions as well:

    • If you manually run the Windows update from the Windows client, does it give any errors when searching for updates? 
    • What are the OS versions of the Windows clients you are trying to update?
    • How are the Windows client WUAs configured (WSUS, directly to Microsoft, SCCM, etc.)?
    1 found this helpful thumb_up thumb_down
  • If we manually run the updates they install without issue. The client is Windows Server 2019, the client is set to get the updates from WSUS.

    Was this post helpful? thumb_up thumb_down

Read these next...