gpt4 book ai didi

ansible-playbook 在收集事实阶段始终失败

转载 作者:行者123 更新时间:2023-12-03 02:09:56 27 4
gpt4 key购买 nike

我的任务是实现一些新的 ansible 剧本,因为我是这里唯一有配置工具经验的人。对我来说问题是我只使用过 puppet,而不是 ansible。然而,无论我为 ansible 写什么,我都会不断得到:

TASK [Gathering Facts] *********************************************************************
fatal: [server1.example.com]: FAILED! => {"failed": true, "msg": "the connection plugin 'heck' was not found"}
fatal: [server2.example.com]: FAILED! => {"failed": true, "msg": "the connection plugin 'heck' was not found"}

对该错误的网络搜索没有结果,但起初我以为这些服务器的 ssh key 可能有问题。然而,测试表明我可以使用 ssh 登录而无需密码。所以,现在我陷入困境了。

有人有解决这个问题的想法吗?

最佳答案

我也遇到了这个错误:

FAILED! => {"failed": true, "msg": "the connection plugin 'heck' was not found"}

我的问题是我试图在检查模式下运行,但在命令中遗漏了一个“-”。

我这样做了:

ansible-playbook foo.yml -check

而不是这个:

ansible-playbook foo.yml --check

通过省略第二个 -ansible-playbook 认为我正在使用连接选项(以 heck 作为值... )。

关于ansible-playbook 在收集事实阶段始终失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44659551/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com