Error ansible over powershell

27 views
Skip to first unread message

Rodrigo Rapozo

unread,
Apr 6, 2016, 11:20:39 AM4/6/16
to Ansible Project
Hello everyone!

I'm trying to use ansible over powershell but when I use this command:

 "ansible chs -m win_ping"

Looks like that it's using ssh because the error is:

x.x.x.x | UNREACHABLE! => {
    "changed": false,
    "msg": "SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue",
    "unreachable": true
}

P.S. My host file (/root/ansible/hosts):
[chs]
x.x.x.x

Someone have any idea?

J Hawkesworth

unread,
Apr 6, 2016, 3:38:36 PM4/6/16
to Ansible Project
Hi,

Do you have
ansible_connection: winrm
set against your host or better still in the group vars that apply to your windows hosts.  See http://docs.ansible.com/ansible/intro_windows.html#inventory

Ansible needs telling to use winrm, otherwise it will default to attempting ssh connection, which is not available on windows.

Jon
Reply all
Reply to author
Forward
0 new messages