0
我使用Ubuntu運行流浪漢,我收到一個錯誤每次我嘗試連接時(重新格式化爲可讀性):誤差Ansible連接到流浪客人使用SSH
<127.0.0.1> ESTABLISH CONNECTION FOR USER: vagrant
<127.0.0.1> REMOTE_MODULE ping
<127.0.0.1> EXEC ssh -C -tt -vvv -o ControlMaster = auto -o ControlPersist = 60s
-o ForwardAgent = yes -o ControlPath="/home/naruto/.ansible/cp/ansible-ssh-%h-%p-%r"
-o StrictHostKeyChecking=no -o Port=2202
-o IdentityFile="/home/naruto/test/.vagrant/machines/default/virtualbox/private_key"
-o KbdInteractiveAuthentication=no
-o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
-o PasswordAuthentication=no -o User=vagrant
-o ConnectTimeout=10 127.0.0.1 /bin/sh -c
'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1452294114.84-103845443589966
&& chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1452294114.84-103845443589966
&& echo $HOME/.ansible/tmp/ansible-tmp-1452294114.84-103845443589966'
testserver | FAILED => SSH Error: command-line line 0: missing argument.
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug
output to help diagnose the issue.
這就是信息在流浪者的ssh-配置:
Host default
HostName 127.0.0.1
User vagrant
Port 2202
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /home/naruto/test/.vagrant/machines/default/virtualbox/private_key
IdentitiesOnly yes
LogLevel FATAL
這是hosts文件Ansible:
[example]
testserver
ansible_ssh_host=127.0.0.1
ansible_ssh_port=2202
ansible_ssh_user=vagrant
ansible_ssh_private_key_file=/home/naruto/test/.vagrant/machines/default/virtualbox/private_key
任何IDE這個問題是什麼或者我該如何解決這個問題呢?謝謝。
你可以用'-vvvv option'運行劇本嗎?它會告訴你究竟是什麼錯誤。 – helloV
我想只執行一個模塊不是一個劇本,但無論如何我都嘗試了這兩個,錯誤就是你在我以前的文章中看到的那個第一個輸出,那是我用ansible -vvvv testserver -m ping得到的。 – rogerscuall