Ansible/pfSense: "SSH encountered an unknown error during the connection"

Ansible/pfSense: "SSH encountered an unknown error during the connection"

我无法通过 Ansible ping 一个虚拟盒子 (vb) 运行ning pfsense by 运行ning:

ansible pfsense -i hosts -m ping

给出: "msg": "SSH 在连接过程中遇到未知错误。

我可以 ssh vb 没有问题,我使用密钥身份验证来做到这一点,所以不需要密码。 我的主机文件:

[all]

pfsense ansible_host=172.18.4.1 ansible_user=admin

我还在 pfsense 控制台上安装了 python 以允许 Ansible 在客户端上 运行。知道有什么问题吗?谢谢

刚刚发现 ansible_user 应该设置为 root。所以我把hosts文件改成了:

[all]
pfsense ansible_host=172.18.4.1 ansible_user=root

这对我有用。