Closed sunilcverma closed 1 year ago
I'm also facing the same error: it fails on line 483 of plugins/modules/win_updates.ps1
as well, inside InvokeAsBatchLogon
.
I have zero knowledge of powershell but the condition triggering this error looks race-y in my utterly unexperienced eyes.
@phess do you know if your scenario is also using become? Is it repeatable or does it occur randomly? Trying to find some common patterns so I can try and replicate the error and track down what might be happening.
I've opened a PR https://github.com/ansible-collections/ansible.windows/pull/495 which rewrites the batch script runner into something with less moving parts. Even if it doesn't solve the problem for you it should at least provide more detailed information on a failure hopefully indicating what the actual problem was.
SUMMARY
ISSUE TYPE
COMPONENT NAME
ansible.windows.win_updates
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Target OS: windows Server 2016 Datacentre
STEPS TO REPRODUCE
ansible-playbook -i ./inventory -l ${HOSTS_TAG} ./playbook.yml --extra-vars "ansible_sudo_pass=${APP11755_TEST_SUDO_PASS}" --extra-vars="ansible_become_pass=${APP11755_TEST_SUDO_PASS}" -vvv
EXPECTED RESULTS
ACTUAL RESULTS