我剛開始使用Ansible和Vagrant。我在我的本地開發中安裝了Ansible,在我看來它運行良好。我在我的項目中創建無業遊民以這種方式清單文件:使用Ansible和Vagrant
vim inventory
testserver ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222
ansible_ssh_user=vagrant
ansible_ssh_private_key_file=/home/user/.vagrant.d/insecure_private_key
蒙山使用下面我得到這個消息中提到的指令:
ansible testserver -i inventory -m ping
testserver | FAILED => SSH encountered an unknown error during the connection. We
recommend you re-run the command using -vvvv, which will enable SSH debugging output to
help diagnose the issue
什麼是配置ansible與流浪者的最佳方法是什麼? 此致敬意。
重新運行'ansible'與'-vvvv'並添加輸出。 – tedder42
我解決了這個問題:我不得不在同一行上發表聲明:testserver ansible_ssh_host = ip ansible_ssh_port = my_port ansible_ssh_private_key_file = my_file – sam
請問您可以添加這個答案並接受它:我碰到過問題,並幾乎錯過了解決方案,因爲它在評論中 – Louis