Problem connecting to Windows Server 2008R2 host

I did some Googling and found ansible_python_interpreter which I set to C:\Program\ Files\Python3.7.5. This removed the python not found warning and the output is now:

ansible -m ping 192.168.230.3 -vvv
ansible 2.8.3
config file = /etc/ansible/ansible.cfg
configured module search path = [‘/home/cyborg/.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.5 (default, Apr 19 2020, 20:18:17) [GCC 9.2.1 20191008]
Using /etc/ansible/ansible.cfg as config file
host_list declined parsing /etc/ansible/hosts as it did not pass it’s verify_file() method
script declined parsing /etc/ansible/hosts as it did not pass it’s verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass it’s verify_file() method
Parsed /etc/ansible/hosts inventory source with ini plugin
META: ran handlers
Using module file /usr/lib/python3/dist-packages/ansible/modules/system/ping.py
Pipelining is enabled.
<192.168.230.3> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO 192.168.230.3
EXEC (via pipeline wrapper)
192.168.230.3 | FAILED! => {
“changed”: false,
“module_stderr”: "Exception calling "Create" with "1" argument(s): "At line:4 char:21\r\n+ def _ansiballz_main():\r\n+ ~\r\nAn expression was expected after ‘(’.\r\nAt line:13 char:27\r\n+ except (AttributeError, OSError):\r\n+ ~\r\nMissing argument in parameter list.\r\nAt line:15 char:7\r\n+ if scriptdir is not None:\r\n+ ~\r\nMissing ‘(’ after ‘if’ in if statement.\r\nAt line:22 char:7\r\n+ if sys.version_info < (3,):\r\n+ ~\r\nMissing ‘(’ after ‘if’ in if statement.\r\nAt line:22 char:30\r\n+ if sys.version_info < (3,):\r\n+ ~\r\nMissing expression after ‘,’.\r\nAt line:22 char:25\r\n+ if sys.version_info < (3,):\r\n+ ~\r\nThe ‘<’ operator is reserved for future use.\r\nAt line:24 char:32\r\n+ MOD_DESC = (‘.py’, ‘U’, imp.PY_SOURCE)\r\n+ ~\r\nMissing expression after ‘,’.\r\nAt line:24 char:33\r\n+ MOD_DESC = (‘.py’, ‘U’, imp.PY_SOURCE)\r\n+ ~~~~~~~~~~~~~\r\nUnexpected token ‘imp.PY_SOURCE’ in expression or statement.\r\nAt line:24 char:32\r\n+ MOD_DESC = (‘.py’, ‘U’, imp.PY_SOURCE)\r\n+ ~\r\nMissing closing ‘)’ in expression.\r\nAt line:24 char:46\r\n+ MOD_DESC = (‘.py’, ‘U’, imp.PY_SOURCE)\r\n+ ~\r\nUnexpected token ‘)’ in expression or statement.\r\nNot all parse errors were reported. Correct the reported errors and try \r\nagain."\r\nAt line:6 char:1\r\n+ $exec_wrapper = [ScriptBlock]::Create($split_parts[0])\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : NotSpecified: (:slight_smile: , MethodInvocationException\r\n + FullyQualifiedErrorId : ParseException\r\n \r\nThe expression after ‘&’ in a pipeline element produced an object that was not \r\nvalid. It must result in a command name, a script block, or a CommandInfo \r\nobject.\r\nAt line:7 char:2\r\n+ &$exec_wrapper\r\n+ ~~~~~~~~~~~~~\r\n + CategoryInfo : InvalidOperation: (:slight_smile: , RuntimeException\r\n + FullyQualifiedErrorId : BadExpression\r\n ",
“module_stdout”: “”,
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,
“rc”: 1
}

See https://docs.ansible.com/ansible/latest/user_guide/windows_faq.html#what-windows-modules-are-available, you cannot run Python modules on Windows. You need to use the win_* variants if they are available.