Have you set ansible_connection=winrm in your inventory file?

http://docs.ansible.com/intro_windows.html#inventory

There are several inventory vars required to identify the host as windows.

Alternatively you can specify "-c winrm" on the command line for this too.

On Friday, August 15, 2014, Vinit Khandagle <[email protected]>
wrote:

> Hello ,
>
> I am trying to use win_ping module to connect to a windows server. but it
> keeps defaulting to SSH
>
> -> ansible --version
> ansible 1.7.1
> linbynd@linbynd-Inspiron:~/packer_prac
> -> ansible -i hosts win -m win_ping -u Administrator -vvv
> <192.168.1.4> ESTABLISH CONNECTION FOR USER: Administrator
> <192.168.1.4> REMOTE_MODULE win_ping
> <192.168.1.4> EXEC ['ssh', '-C', '-tt', '-q', '-o', 'ControlMaster=auto',
> '-o', 'ControlPersist=1800s', '-o',
> 'ControlPath=/home/linbynd/.ansible/cp/ansible-ssh-%h-%p-%r', '-o',
> 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o',
> 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey',
> '-o', 'PasswordAuthentication=no', '-o', 'User=Administrator', '-o',
> 'ConnectTimeout=10', '192.168.1.4', "/bin/sh -c 'mkdir -p
> $HOME/.ansible/tmp/ansible-tmp-1408141292.45-166274142953398 && chmod a+rx
> $HOME/.ansible/tmp/ansible-tmp-1408141292.45-166274142953398 && echo
> $HOME/.ansible/tmp/ansible-tmp-1408141292.45-166274142953398'"]
> ^CTraceback (most recent call last):
>
> Any idea what could be the issue, I am trying to use for windows.
>
> - Vinit
>
> --
> 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]
> <javascript:_e(%7B%7D,'cvml','ansible-project%[email protected]');>
> .
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/7d523a09-fd95-4f93-9b93-06bf8cfc15d0%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/7d523a09-fd95-4f93-9b93-06bf8cfc15d0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Matt Martz
[email protected]
http://sivel.net/

-- 
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/CAD8N0v8MJ8oAjvhJbthJywddPR6OJHxGNvi1ku16tmiLW3n2PQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to