Ansible Galaxy SSL 报错

[root@localhost roles]# ansible-galaxy install dj-wasabi.zabbix-agent

[DEPRECATION WARNING]: DEFAULT_SUDO_USER option, In favor of Ansible Become, which is a generic framework. See become_user. , use become instead. This feature will be removed in version 2.8. Deprecation warnings can be

disabled by setting deprecation_warnings=False in ansible.cfg.

[WARNING]: - username.role_name was NOT installed successfully: Failed to get data from the API server (https://galaxy.ansible.com/api/): Failed to validate the SSL certificate for galaxy.ansible.com: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  (the python executable used (/usr/bin/python2) is version: 2.7.5 (default, Jun

24 2015, 00:41:19) [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]) 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. The exception msg was: hostname u'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.


解决方法:  使用-c参数,忽略证书

[root@localhost roles]# ansible-galaxy install dj-wasabi.zabbix-agent -c

[DEPRECATION WARNING]: DEFAULT_SUDO_USER option, In favor of Ansible Become, which is a generic framework. See become_user. , use become instead. This feature will be removed in version 2.8. Deprecation warnings can be

disabled by setting deprecation_warnings=False in ansible.cfg.

- downloading role 'zabbix-agent', owned by dj-wasabi

- downloading role from https://github.com/dj-wasabi/ansible-zabbix-agent/archive/1.4.0.tar.gz

- extracting dj-wasabi.zabbix-agent to /root/.ansible/roles/dj-wasabi.zabbix-agent

- dj-wasabi.zabbix-agent (1.4.0) was installed successfully

You have new mail in /var/spool/mail/root

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容