Apologies if this has been covered somewhere and I missed it.
Is it possible to have ansible-galaxy (CLI) connect using a proxy? we have our primary ansible box walled off and it needs to use a proxy to connect to the web (galaxy.ansible.com, github.com…)
I have tried using tsocks as well as setting environment variables but none of these options seem to be honored by galaxy cli.
Is anyone aware of anyother method to use ansible-galaxy with a proxy?
I’m also running into this issue. I have http_proxy and https_proxy variables pointing to our proxy server, and I’m able to wget and curl from galaxy.ansible.com, but if I run ansible-galaxy init, I get “- the API server (galaxy.ansible.com) is not responding, please try again later.” Is the only way I’ll be able to use it at this point manually downloading? Thanks.
This works in ansible 2.0. It requires using the --ignore-certs flag.
I simulated a proxy server using Charles Proxy. In the Charles proxy settings I enabled SSL Proxying for galaxy.ansible.com:443. Then I did the following:
From the above I can see the request route through Charles and return a valid response from the API. Without --ignore-certs the init command fails. I think the issue is that the proxy is not forwarding the root certificate from galaxy.ansible.com down to the client.
Prior to 2.0 the --ignore-certs flag is not available on the init command. I’m looking into the code now and will submit a PR to add it.