我的清单文件ansible平模块连接失败
bash ~ cat inventory
输出
[webservers]
testserver ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222
当我尝试连接
bash ~ ansible 127.0.0.1 -i inventory -m ping
它得到了成功的
127.0.0.1 | success >> {
"changed": false,
"ping": "pong"
}
当我使用网络服务器从inventory file
bash ~ ansible webservers -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
我能想出的这个问题
您是否尝试在命令末尾添加-vvvv标志以查看正在使用的SSH命令以及可能产生的错误? – 2015-02-06 16:46:54
您的testserver | FAILED => SSH遇到未知错误,不是网络服务器,请检查它 – 2015-02-07 15:47:14