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, 2019 in Ansible by Laksha
2,341 views

1 answer to this question.

0 votes
Check your python version. It should be 2.x.
answered Mar 14, 2019 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

How do I wget a file from web server using shell in the ansible playbook

Hey Ayaan, you could probably use this ...READ MORE

answered Jan 24, 2019 in Ansible by Anushri
4,155 views
0 votes
1 answer

How to create a new encrpted file using Ansible Vault?

If you are creating a new file ...READ MORE

answered Jan 29, 2019 in Ansible by Kyraa
1,026 views
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, 2019 in Ansible by Kanika
1,074 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,034 views
+2 votes
1 answer
+1 vote
3 answers
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP