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.


On Friday, June 3, 2016 at 7:39:16 AM UTC-7, aaron... wrote:
>
> 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?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d8879f2a-7987-4d40-be2b-d959acf57d9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to