Collection installation can contact a public Galaxy service and a private Git host in the same workflow. If public traffic needs a proxy but the private host is directly reachable, provide that split to the process running ansible-galaxy.

export https_proxy='http://proxy.example:8080'
export no_proxy='gitlab.internal.example'
ansible-galaxy collection install -r requirements.yml

This illustrates the controller shell for an existing requirements file. Merge the private host with any other intended bypass entries. If the public Galaxy downloads may use a public intermediary, the HTTP proxy list supplies candidates for https_proxy; preserve the directly reachable private Git exceptions. The entry names the destination host, not the proxy and not a complete repository URL.

A playbook’s environment keyword configures the selected remote task environment; it does not configure Ansible itself or retroactively supply the environment for collection installation.

Trace the failed URL and downloader. A collection can come from an API, an archive URL or Git. A Git subprocess may also have its own proxy configuration, so compare that configuration with its inherited environment when only repository access fails. Keep any additional private archive or dependency hosts in the routing policy as well.

Tënë sô zo