ansible [core 2.13.7] on Rocky Linux 8.9 connecting to/configuring Windows Server 2022 Standard
I have a pretty boring playbook:
- name: Search security updates
ansible.windows.win_updates:
category_names:
- SecurityUpdates
state: searched
log_path: D:\logs\ansible_wu.txt
It errors with the following:
The full traceback is:
Exception calling "NativeCreateProcess" with "9" argument(s): "CreateProcessW() failed (Access is denied, Win32ErrorCode 5 - 0x00000005)"
At line:2182 char:24
+ ... $taskPid = Invoke-InProcess @invokeSplat -ParentProcessId $parentPid ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-InProcess], MethodInvocationException
+ FullyQualifiedErrorId : Win32Exception,Invoke-InProcess
ScriptStackTrace:
at Invoke-InProcess, <No file>: line 490
at <ScriptBlock>, <No file>: line 2182
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"
],
"log_path": "D:\\logs\\ansible_wu.txt",
"reboot": false,
"reboot_timeout": 1200,
"reject_list": null,
"server_selection": "default",
"skip_optional": false,
"state": "searched"
}
},
"msg": "Failed to start new win_updates task with Task Scheduler: Exception calling \"NativeCreateProcess\" with \"9\" argument(s): \"CreateProcessW() failed (Access is denied, Win32ErrorCode 5 - 0x00000005)\"",
"updates": {}
}
Ansible can successfully connect to the server with win_ping, win_service_info, etc.
Thank you in advance, and please let me know what other information I can provide.