Hi All--

I'm running into an issue connecting from an Ubuntu 16.04 system to a 
Windows 2012 Server on a domain:

afisher@ubuntu:~/Projects/build-utils/ansible-playbooks$ ansible windows -i 
> inventory.yml -m win_ping -vvvv
> Using /etc/ansible/ansible.cfg as config file
> Loading callback plugin minimal of type stdout, v2.0 from 
> /usr/lib/python2.7/dist-packages/ansible/plugins/callback/__init__.pyc
>  [WARNING]: ansible_winrm_cert_validation unsupported by pywinrm (is an 
> up-to-date version of pywinrm installed?)
> Using module file 
> /usr/lib/python2.7/dist-packages/ansible/modules/core/windows/win_ping.ps1
> <edprjenslave03.DOMAIN.COM> ESTABLISH WINRM CONNECTION FOR USER: 
> [email protected] on PORT 5985 TO edprjenslave03.DOMAIN.COM
> edprjenslave03.DOMAIN.COM | UNREACHABLE! => {
>     "changed": false, 
>     "msg": "kerberos: (u'http', u'Bad HTTP response returned from server. 
> Code 500'), plaintext: the specified credentials were rejected by the 
> server", 
>     "unreachable": true
> }


At first it was just refusing without the kerberos part of the error. 
Realized I didn't have Kerberos installed. Remedied that:

Ticket cache: FILE:/tmp/krb5cc_1000
> Default principal: [email protected]
> Valid starting       Expires              Service principal
> 05/02/2017 09:23:47  05/02/2017 19:23:47  krbtgt/[email protected]
> renew until 05/03/2017 09:23:41
> 05/02/2017 09:49:54  05/02/2017 19:23:47  HTTP/edprjenslave03.domain.com@
> renew until 05/03/2017 09:23:41
> 05/02/2017 09:49:54  05/02/2017 19:23:47 
>  HTTP/[email protected]
> renew until 05/03/2017 09:23:41


Tried adding the user to the local administrators, no dice.

Confirmed that I indeed do have the latest version of pywinrm installed:

afisher@ubuntu:~/Projects/build-utils/ansible-playbooks$ sudo -H pip 
> install --upgrade pywinrm
> Requirement already up-to-date: pywinrm in 
> /usr/local/lib/python2.7/dist-packages
> Requirement already up-to-date: xmltodict in 
> /usr/local/lib/python2.7/dist-packages (from pywinrm)
> Requirement already up-to-date: requests-ntlm>=0.3.0 in 
> /usr/local/lib/python2.7/dist-packages (from pywinrm)
> Requirement already up-to-date: six in /usr/lib/python2.7/dist-packages 
> (from pywinrm)
> Requirement already up-to-date: requests>=2.9.1 in 
> /usr/local/lib/python2.7/dist-packages (from pywinrm)
> Requirement already up-to-date: ntlm-auth>=1.0.2 in 
> /usr/local/lib/python2.7/dist-packages (from requests-ntlm>=0.3.0->pywinrm)


Here's my inventory file:

---
> [windows]
> edprjenslave03.DOMAIN.COM


Here's my group_vars/windows.yml

---
> ansible_user: [email protected]
> ansible_password: the_pass
> ansible_port: 5985
> ansible_connection: winrm
> ansible_winrm_cert_validation: ignore


Any ideas? I'm starting to run out of tricks.

Thanks!

Allen

-- 
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/aaa54bf1-1a05-4ee5-bd89-509135f8a370%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to