You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ansible URI任务突发SSL证书验证失败问题求助

Ansible URI任务突发SSL证书验证失败问题求助

各位大佬好,最近碰到个棘手的问题想请教下:

我有一系列之前运行正常的Ansible playbook,突然全部失效了。我没对Ansible服务器做过什么重大改动,只是执行了系统更新而已。这些playbook对接的都是防火墙、交换机这类设备,它们通常用的都是自签名证书。

我特意核对了URI模块的设置,确认所有playbook里都已经配置了validate_certs: no,甚至还试了改成false、False、No这些不同写法,但完全没用,问题依旧。

我现在看到的错误信息是:

fatal: [sampleFirewall]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "field": {}, "msg": "Request failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1007)>"}

这错误看起来就好像URI模块根本没识别到我设置的validate_certs参数一样。我实在想不到别的明显原因了,难道是某个模块的新版本强制要求证书签名?或者这会不会是个bug?

我的环境信息如下:

ansible [core 2.15.2]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/username/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/username/.local/lib/python3.10/site-packages/ansible
ansible collection location = /home/username/.ansible/collections:/usr/share/ansible/collections
executable location = /home/username/.local/bin/ansible
python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/usr/bin/python3)
jinja version = 3.1.2
libyaml = True

备注:内容来源于stack exchange,提问作者Moridn

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.21 07:13:09