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
132 views

1 answer to this question.

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
89 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
250 views
0 votes
1 answer
0 votes
3 answers
0 votes
1 answer