Failed to get data from the API server (https://galaxy.ansible.com/api/)

Hi All,
I’ve encountered an error when i called vagrant up. My network works through a proxy. Environment variables are set.

Error message:

Well Ansible needs to connect https://galaxy.ansible.com/api/ or it can’t install the galaxy roles and nothing will work. Not sure how much we can help with your proxy situation. That’s obviously a non-standard set up.

You could try and download the roles manually and put them in vendor. Ansible might avoid trying to download them itself then.

1 Like

Thank you very much for the advice. My problem was that it was necessary to set environment variables inside a virtual machine.

Can do this:

  1. Directly in the virtual machine after deployment
  2. Using the plugin, vagrant-proxyconf. Read about how to do this please follow the link: https://stackoverflow.com/questions/19872591/how-to-use-vagrant-in-a-proxy-environment
1 Like