Ansible 2.4.2
Python 2.7.5
CentOS 7.5
连接到Windows 2008 R2 SP1
Group_vars / windows.yml(已使用保管库加密)-
ansible_connection: winrm
ansible_winrm_transport: kerberos
ansible_become: false
ansible_ssh_port: 5985
ansible_ssh_user: user@DOMAIN.LOCAL
ansible_ssh_password: 'Passwordwith^InIt'
我尝试了“ Passwordwith ^ InIt”,Passwordwith ^ InIt,Passwordwith \ ^ InIt-都无济于事。
运行此:
ansible-playbook -i windows-hosts playbooks/wintest.yml -e "machine=machine" -vv --vault-id @prompt
与上述yml文件一起导致此错误:
fatal: [machine]: UNREACHABLE! => {"changed": false, "msg": "kerberos: authGSSClientInit() failed: (('Unspecified GSS failure. Minor code may provide more information', 851968), (\"Can't find client principal user@DOMAIN.LOCAL in cache collection\", -1765328243))"
在这里变得很奇怪。如果我运行此命令:
ansible-playbook -i windows-hosts playbooks/wintest.yml -e "machine=machine" -vv --vault-id @prompt --ask-pass
并输入与上面相同的密码,该剧本便会成功运行。
有人知道密码来自库而不是命令行时,是什么引起问题的?