Error: Failed to get data from the API server - when trying to create a new role structure using ansible galaxy

0 votes

I tried creating a  new role structure using the ansible galaxy command but ended up with this error:

$ ansible-galaxy install asangal.wavefront-ansible
 [WARNING]: - asangal.wavefront-ansible was NOT installed successfully: Failed to get data from the API server (https://galaxy.ansible.com/api/): a bytes-like object is
required, not 'str'

ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.
Mar 14 in Ansible by Laksha
39 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Check your python version. It should be 2.x.
answered Mar 14 by Haider
My python version is 2.7.10
Make sure no other version of python is installed. By default,Haider ansible should be using this 2.7.10 version.
Ohh yeahh, I have a 3.5 version of python on my system and my ansible was using this python. i changed it to 2.7.10 and it works fine. Thank you

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

CRC check failed error when pulling ansible role from git

You can try adding --no-wait option to the ansible-galaxy import call ...READ MORE

answered Mar 14 in Ansible by Kanika
38 views
+13 votes
2 answers
0 votes
1 answer
0 votes
3 answers
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.