-
Notifications
You must be signed in to change notification settings - Fork 167
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_update failed since ansible 7.7.0 #593
Comments
This is essentially a duplicate of #540. For whatever reason there is some sort of host configuration that I am unable to determine that causes It is also possible to replicate this problem outside of Ansible and this module directly. It's been a while since I last had someone test it but IIRC the following failed when run from Windows # Replace target-host with the affected Windows host you can WinRM to
Invoke-Command -ComputerName target-host -Command {
(Start-Process cmd.exe -ArgumentList '/c exit 1' -UseNewEnvironment -Wait -PassThru).ExitCode
}
winrs -r:http://target-host:5985/wsman powershell.exe -Command "(Start-Process cmd.exe -ArgumentList '/c exit 1' -UseNewEnvironment -Wait -PassThru).ExitCode" The first example replicates how the The actual example I gave in the past to replicate the problem was https://gist.github.com/jborean93/94b3eea93dbca15e60c51247c3a7b399 but I believe the above is enough to trigger it if your host is affected. |
Thank you for the quick answer and sorry for the duplicate issue :(
I switch from SSH to winrm -> same issue.
I have to change some things to swith from ssh to psrp... like login/pwd creds instead of private/public keys but I have no choices I guess... Thank you very much. |
Interesting that the Are you aware of any auditing/GPOs that could be applied to your host that might be problematic? Knowing more about the environment might let me know more information about what is causing the underlying issue. |
Closing as no more information was provided, if you ever get back to this I can certainly reopen the issue to investigate more but unfortunately I and our CI runs are unable to reproduce the problem. |
at @jborean93 Could the difference in calling the module cause this bug?
vs
My role error in detail [08:21:24] win_install_updates_and_reboot_role : search for Microsoft Windows updates ...Saturday 05 October 2024 08:21:24 +0200 (0:00:09.544) 0:00:21.482 ******
ansible_collections.ansible.windows.plugins.action.win_updates._ReturnResultException:
|
SUMMARY
Hello,
When I launch the module ansible_windows_win_update in ansible 6.7.0, it works.
I upgrade to the latest ansible version -> it failed. I follow the white rabbit and find it didn't work since ansible 7.7.0
Exception calling "NativeCreateProcess" with "9" argument(s): "CreateProcessW() failed (Access is denied, Win32ErrorCode 5 - 0x00000005)
maybe somthing to do with this commit : 16d2359
ISSUE TYPE
COMPONENT NAME
win_update
ANSIBLE VERSION
also test with :
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
ansible controller :
WSL2
cat /etc/debian_version
11.9
Target : Windows 2016 ssh with domain account
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
Thank you for your help, I didn't see anything in windows logs event :(
The text was updated successfully, but these errors were encountered: