Hi,
I think I have the exact same problem.
Running ansible 2.1.1.0-1.el7 on CentOS 7.2.1511
Here is an example of ansible command output:
`
[alfkla@webdmz.no@tvm-alfkla ~]$ ansible -i hosts TVM-ALF2012R2 -m win_ping -vvvvv
Using /etc/ansible/ansible.cfg as config file
Loaded callback minimal of type stdout, v2.0
<192.168.4.225> ESTABLISH WINRM CONNECTION FOR USER: alfkla@WEBDMZ.NO on PORT 5985 TO 192.168.4.225
<192.168.4.225> WINRM CONNECT: transport=kerberos endpoint=http://192.168.4.225:5985/wsman
<192.168.4.225>
WINRM CONNECTION ERROR: authGSSClientStep() failed: ((‘Unspecified GSS
failure. Minor code may provide more information’, 851968), (‘Server
not found in Kerberos database’, -1765328377))
Traceback (most recent call last):
File “/usr/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py”, line 151, in winrm_connect
self.shell_id = protocol.open_shell(codepage=65001) # UTF-8
File “/usr/lib/python2.7/site-packages/winrm/protocol.py”, line 132, in open_shell
res = self.send_message(xmltodict.unparse(req))
File “/usr/lib/python2.7/site-packages/winrm/protocol.py”, line 207, in send_message
return self.transport.send_message(message)
File “/usr/lib/python2.7/site-packages/winrm/transport.py”, line 170, in send_message
prepared_request = self.session.prepare_request(request)
File “/usr/lib/python2.7/site-packages/requests/sessions.py”, line 394, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File “/usr/lib/python2.7/site-packages/requests/models.py”, line 298, in prepare
self.prepare_auth(auth, url)
File “/usr/lib/python2.7/site-packages/requests/models.py”, line 500, in prepare_auth
r = auth(self)
File "/usr/lib/python2.7/site-packages/requests_kerberos/kerberos.py", line 318, in call
auth_header = self.generate_request_header(None, host, is_preemptive=True)
File “/usr/lib/python2.7/site-packages/requests_kerberos/kerberos_.py”, line 158, in generate_request_header
raise KerberosExchangeError(“%s failed: %s” % (kerb_stage, str(error.args)))
KerberosExchangeError:
authGSSClientStep() failed: ((‘Unspecified GSS failure. Minor code may
provide more information’, 851968), (‘Server not found in Kerberos
database’, -1765328377))
TVM-ALF2012R2 | UNREACHABLE! => {
“changed”: false,
“msg”: “kerberos: authGSSClientStep() failed: ((‘Unspecified GSS
failure. Minor code may provide more information’, 851968), (‘Server
not found in Kerberos database’, -1765328377))”,
“unreachable”: true
}
`
The kerberos ticket is ok:
`
[alfkla@webdmz.no@tvm-alfkla ~]$ klist
Ticket cache: KEYRING:persistent:1015602603:1015602603
Default principal: alfkla@WEBDMZ.NO
Valid starting Expires Service principal
20. okt. 2016 13:06 20. okt. 2016 23:06 krbtgt/WEBDMZ.NO@WEBDMZ.NO
renew until 27. okt. 2016 13:06
`
The inventory is like this:
`
[alfkla@webdmz.no@tvm-alfkla ~]$ grep ^TVM-ALF2012R2 hosts
TVM-ALF2012R2 ansible_host=192.168.4.225 ansible_user=alfkla@WEBDMZ.NO
ansible_password=xXxXxXxXx ansible_port=5985 ansible_connection=winrm
ansible_winrm_transport=kerberos ansible_winrm_kerberos_delegation=yes
`
Any clue why this happens?
All help will be highly appreciated! :o)
Vennlig hilsen,
Alf Normann Klausen