NEED HELP - connecting via winrm

I am having trouble connecting to a windows vm via the ansible winrm connection.
I am using ansible 2.0.2

host settings

[Windows]
GP1-LAB-OPSTST2.com
192.168.30.101.com

[Windows_var]
ansible_ssh_user=
ansible_ssh_pass=
ansible_ssh_port=5985
ansible_connection=winrm

ansible returns

root@GP1-LAB-OPSTST1:/etc/ansible# ansible Windows -m win_ping
192.168.30.101.com | UNREACHABLE! => {
“changed”: false,
“msg”: “Failed to connect to the host via ssh.”,
“unreachable”: true
}
GP1-LAB-OPSTST2.com | UNREACHABLE! => {
“changed”: false,
“msg”: “Failed to connect to the host via ssh.”,
“unreachable”: true

Windows machine

address = *
transport = http
port = 5985
hostname
enabled = true
urlprefix = wsman
certificate thumbprint
listening on = 127.0.0.1, 192.168.30.101, ::1

Any clues as to what to do next?

The var definition in your inventory file is wrong- try:

[Windows:vars]

Also, if you’re on 2.x you should probably use the new ansible_user/ansible_port/ansible_password vars. The old ansible_ssh_X versions will continue to work, but the new ones are much clearer.