Ansible 出现"Failed to validate the SSL certificate"

2022-10-17 12:15:13 +08:00
 JasonLaw

不是特别了解 Ansible ,运行 Ansible get_url module 时出现错误,请问怎么解决?

fatal: [xxx]: FAILED! => {"changed": false, "failed": true, "msg": "Failed to validate the SSL certificate for xxx:443. Make sure your managed systems have a valid CA certificate installed. If the website serving the url uses SNI you need python >= 2.7.9 on your managed machine or you can install the `urllib3`, `pyopenssl`, `ndg-httpsclient`, and `pyasn1` python modules to perform SNI verification in python >= 2.6. You can use validate_certs=False if you do not need to confirm the servers identity but this is unsafe and not recommended. Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificates/cacert.org, /etc/ansible"}
702 次点击
所在节点    程序员
5 条回复
julyclyde
2022-10-17 15:00:43 +08:00
你 get 的网址上的证书是正经证书吗?
如果是的话,需要更新被控节点上的 ca
mmm159357456
2022-10-17 16:01:19 +08:00
JasonLaw
2022-10-17 21:40:47 +08:00
julyclyde
2022-10-18 08:52:26 +08:00
@JasonLaw 你手头管理的这些已经版本太旧了,建议整体升级
不仅仅是 ansible 、python 的问题
JasonLaw
2022-10-18 08:58:38 +08:00
@julyclyde #4 不是我想升级就升级的😅。公司要求的是稳定性,不会让这么干的,没办法,行业决定了。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/887480

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX