您的位置:首页 > 大数据 > 人工智能

ansible error:failed to resolve remote temporary directory from ansible-tmp

2016-08-04 18:32 639 查看
系统版本

LSB Version:	:base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID:	CentOS
Description:	CentOS release 6.6 (Final)
Release:	6.6
Codename:	Final


openssl  openssh 版本
openssl-1.0.1e-30.el6.x86_64
openssh-server-5.3p1-104.el6.x86_64
openswan-2.6.32-37.el6.x86_64
openssh-5.3p1-104.el6.x86_64
openssh-clients-5.3p1-104.el6.x86_64
openssl-devel-1.0.1e-30.el6.x86_64
opensp-1.5.2-12.1.el6.x86_64


ansible版本

ansible 2.2.0 (devel 73f06e67df) last updated 2016/07/28 17:06:38 (GMT +800)
lib/ansible/modules/core: (detached HEAD 24db4de245) last updated 2016/07/28 17:14:34 (GMT +800)
lib/ansible/modules/extras: (detached HEAD db979dde74) last updated 2016/07/28 17:15:11 (GMT +800)
config file =
configured module search path = Default w/o overrides


目标机器需要ssh key登录, 且 key 需要输入密码

现象: 第一次发起连接的时候, 总是报错; 第二次则可以正常执行

[root@test ip]# ansible -vvvv test -e 'ansible_ssh_user=root' --private-key=/root/bin/.key/id_rsa -m ping
No config file found; using defaults
Loaded callback minimal of type stdout, v2.0
Using module file /root/ansible/lib/ansible/modules/core/system/ping.py
<xx.xx.xx.xx> ESTABLISH SSH CONNECTION FOR USER: root
<xx.xx.xx.xx> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/root/bin/.key/id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r xx.xx.xx.xx '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1470306129.03-107348505591642 `" && echo ansible-tmp-1470306129.03-107348505591642="` echo $HOME/.ansible/tmp/ansible-tmp-1470306129.03-107348505591642 `" ) && sleep 0'"'"''
Enter passphrase for key '/root/bin/.key/id_rsa':
xx.xx.xx.xx | FAILED! => {
"failed": true,
"msg": "failed to resolve remote temporary directory from ansible-tmp-1470306129.03-107348505591642: `( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1470306129.03-107348505591642 `\" && echo ansible-tmp-1470306129.03-107348505591642=\"` echo $HOME/.ansible/tmp/ansible-tmp-1470306129.03-107348505591642 `\" )` returned empty string"
}


试了很多老外的方法, 都没有解决, 那个崩溃啊:
https://github.com/ansible/ansible/issues/13876 https://github.com/ansible/ansible/issues/14465 https://github.com/FreiFunkMuenster/ansible-ffms/issues/38
拍脑袋, 把 openssh openssl 升级一把...

openssh-clients-5.3p1-118.1.el6_8.x86_64
openssl-1.0.1e-48.el6_8.1.x86_64
openssh-5.3p1-118.1.el6_8.x86_64
openssl-devel-1.0.1e-48.el6_8.1.x86_64
openssh-server-5.3p1-118.1.el6_8.x86_64


现象消失... TOT
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐