使用ansible-tower连接到我的Windows机器时出现以下错误 .
我确实使用了ansible tower connecting to windows,他们建议在库存中使用以下内容>变量ansible_connection:winrm ansible_ssh_port:5986 ansible_winrm_server_cert_validation:ignore
但是当我运行它仍然失败时,看起来它仍然试图使用ssh而不是winrm进行连接 . 以下是我的ansible塔工作的输出:
> ansible-playbook 2.4.1.0
config file = /etc/ansible/ansible.cfg
> configured module search path = [u'/var/lib/awx/.ansible/plugins/modules',
> u'/usr/share/ansible/plugins/modules'] ansible python module
> location = /usr/lib/python2.7/site-packages/ansible executable
> location = /usr/bin/ansible-playbook python version = 2.7.5
> (default, May 3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat
> 4.8.5-14)] Using /etc/ansible/ansible.cfg as config file SSH password: PLAYBOOK: main.yaml
> ************************************************************ 1 plays in main.yaml PLAY [all]
> ********************************************************************* 11:24:35 TASK [Gathering Facts]
> ********************************************************* 11:24:35 fatal: [server_ip]: UNREACHABLE! => {"changed": false, "msg": "ssl:
> the specified credentials were rejected by the server", "unreachable":
> true}
我错过了什么吗?我看到大多数人都在谈论安赛而不是塔 . 我能够使用ansible工作,所以我知道我可以连接到Windows服务器 . 谢谢 .
1 回答
由于作者ansible kerberos setup,这篇文章可以帮助其他人:
安装krb5-workstation,gcc,krb5-devel,krb5-libs,pip install kerberos,pip install requests_kerberos
按照文章首先测试与Windows的ansible连接
将组下的主机名更改为FQDN名称,而不是塔中的IP . 如果需要,您可以将ansible_winrm_transport:kerberos添加到变量中
重新开始工作 .