我正在尝试从安装了Ansible的Linux服务器上ping Windows服务器:
ansible windows -i etc/ansible/hosts -m win_ping -u user@REALM.NET -vvvv
我收到此错误:
<server.com> ESTABLISH WINRM CONNECTION FOR USER: on PORT 5985 TO server.com
<server.com> WINRM CONNECT: transport=kerberos endpoint=http://server.com:5985/wsman
...
File "/usr/lib/python2.6/site-packages/winrm/transport.py", line 167, in __init__
kerberos.authGSSClientStep(krb_context, '')
GSSError: (('Unspecified GSS failure. Minor code may provide more information', 851968),
('Server not found in Kerberos database', -1765328377))
等/ ansible /主机
[windows]
server.com:5985
等/ ansible / group_vars / windows.yml
ansible_user: user@REALM.NET
ansible_pass: password
ansible_port: 5985
ansible_connection: winrm
等/的krb5.conf
[libdefaults]
dns_lookup_kdc = true
dns_lookup_realms = false
default_realm = REALM.NET
[realms]
REALM.NET = {
kdc = server.com
}
[domain_realm]
.server.com = REALM.NET
我也更新this SO question如this SO question中所述
有任何想法如何解决这个问题?
1 回答
好吧,所以我不知道这是否有帮助,但是从这个SO post Ansible windows fails with "Server not found in Kerberos database"看起来你需要确保Linux机器加入域以便使用Kerberos . 这是一个解释如何join a Linux box to Active Directory domian的链接