首页 文章

Ansible:陷入连接阶段/收集事实

提问于
浏览
1

我一直把头靠在墙上 - 几天前,ansible停止了连接到我的一个盒子 . 它只是在下面的输出后挂起 . 我最近在盒子里做的唯一事情就是做apt-get升级......没别的了 . 以前工作得很好 . 我是唯一有权访问它的人 .

任何关于在哪里寻找的提示?我尝试在我的主机文件中启用和禁用sudo,没有任何区别 .

命令我运行:

ansible-playbook site.yml -i hosts.yml -vvvv -u ubuntu

输出并挂起:

<cb2> ESTABLISH CONNECTION FOR USER: ubuntu
<cb2> REMOTE_MODULE setup
<cb2> EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/Users/alexweinstein/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 cb2 /bin/sh -c 'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python'

请注意,我可以ssh到盒子就好了 . 使用ansible 1.9.4 .

附加信息:

  • 当我尝试使用与ansible输出相同的ssh命令进入框时(见下文),连接正常:

ssh -C -vvv -o ControlMaster = auto -o ControlPersist = 60s -o ControlPath =“/ Users / alexweinstein / .ansible / cp / ansible-ssh-%h-%p-%r”-o KbdInteractiveAuthentication = no - o PreferredAuthentications = gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication = no -o User = ubuntu -o ConnectTimeout = 10 cb2

  • Ping命令在同一点上挂起 .

ansible all -i hosts.yml -m ping -vvvv

1 回答

  • 3

    我通过升级到ansible 2.1解决了问题 . 但是,只要启用详细输出(ansible-playbook -vvv或ansible -v),挂起就会保持!我关闭了详细输出,问题就消失了 .

    显然是Ansible bug .

相关问题