黑帽联盟

标题: ansible-galaxy安装role报错:Failed to validate the SSL certificate for galaxy [打印本页]

作者: yun    时间: 2019-1-22 16:19
标题: ansible-galaxy安装role报错:Failed to validate the SSL certificate for galaxy
具体错误如下:

[WARNING]: - 安装的角色名称 was NOT installed successfully: Failed to get datafrom the API server (https://galaxy.ansible.com/api/): Failed to validate theSSL certificate for galaxy.ansible.com:443. Make sure your managed systems havea valid CA certificate installed. If the website serving the url uses SNI youneed python >= 2.7.9 on your managed machine  (the python executable used(/usr/bin/python) is version: 2.7.6 (default, Nov 23 2017, 15:49:48) [GCC4.8.4]) or you can install the `urllib3`, `pyOpenSSL`, `ndg-httpsclient`, and`pyasn1` python modules to perform SNI verification in python >= 2.6. You canuse validate_certs=False if you do not need to confirm the servers identity butthis 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. The exception msg was: hostnameu'galaxy.ansible.com' doesn't match either of'*.c1e4.galaxy.openshiftapps.com', 'c1e4.galaxy.openshiftapps.com'.

ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.

原因:要求python版本必须是2.7.6,如果不是,可以使用-c选项跳过验证即可,即:ansible-galaxy install 安装的角色名称 -c

本地截图:
55.png

作者: 史珍香    时间: 2019-3-5 12:13
不错,学习了谢谢




欢迎光临 黑帽联盟 (https://bbs.cnblackhat.com/) Powered by Discuz! X2.5