Failed to validate the SSL certificate for galaxy.ansible.com:443
See original GitHub issueBug Report
SUMMARY
ansible-galaxy
cannot download roles from galaxy.ansible.com because of an SSL error.
Other domains - such as github.com - work fine using the same environment & version of ansible.
We did not have any issue last week with the exact same setup.
We reproduced this on multiple Ubuntu / Windows /Docker machines with different connections.
$ ansible --version
ansible 2.6.0
config file = None
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.6 (default, Nov 23 2017, 15:49:48) [GCC 4.8.4]
STEPS TO REPRODUCE
In requirements.yml
:
---
- src: Stouts.mongodb
version: 2.2.7
In a shell running in the same directory as requirements.yml
:
docker run --rm -it -v `pwd`:/data ansible/ansible:ubuntu1404 bash
# the following commands now run in the newly created Docker container
cd /data
pip install ansible
ansible-galaxy install --role-file=/data/requirements.yml
EXPECTED RESULTS
The role Stouts.mongodb
is installed.
ACTUAL RESULTS
[WARNING]: - Stouts.mongodb 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/python) is version: 2.7.6 (default, Nov 23 2017, 15:49:48) [GCC
4.8.4]) 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.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:13 (6 by maintainers)
Top Results From Across the Web
How to fix following ansible galaxy SSL error? - Stack Overflow
The underlying problem is that your Python environment is not finding/making use of the default root certificates that are installed on your OS....
Read more >Ansible, Github, and a Failed to validate the SSL certificate story
[ERROR]: failed to download the file: Failed to validate the SSL certificate for github.com:443. Make sure your managed systems have a valid ......
Read more >Why Am I Receiving SSL Certificate Errors When ...
When downloading roles from Ansible Galaxy, receiving an error like ... the file: Failed to validate the SSL certificate for github.com:443.
Read more >ansible/ansible - Gitter
Failed to get data from the API server (https://galaxy.ansible.com/api/): Failed to validate the SSL certificate for galaxy.ansible.com:443.
Read more >ansible-galaxy fails to validate the SSL certificateurlopen error ...
ansible -galaxy fails to validate the SSL certificateurlopen error SSL CERTIFICATE VERIFY FAILED RROR - you can use --ignore-errors to skip ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Seems to be working OK for me:
Started happening to me as well today, I had to add the -c flag to ignore cert warnings.