Using the Proxy
Clients use Galaxy Proxy exactly as they would use Ansible Galaxy, with the proxy's address ending in /api/ as the server URL. In the examples below, replace https://galaxy-proxy.example.com with the proxy's external URL (the URL setting).
Using the proxy with ansible-galaxy
Point ansible-galaxy at the proxy directly with the -s (--server) option:
ansible-galaxy collection install -s https://galaxy-proxy.example.com/api/ community.vmware
To use the proxy for every command, add it as a Galaxy server in ansible.cfg:
[galaxy]
server_list = galaxy_proxy
[galaxy_server.galaxy_proxy]
url = https://galaxy-proxy.example.com/api/
If the proxy requires an API token, add token = <token> to the server section, or pass --token on the command line. See Authentication.
Using the proxy from Ascender
To have Ascender project updates download collections through the proxy:
- In Ascender, create a credential of type Ansible Galaxy/Automation Hub API Token. Set Galaxy Server URL to the proxy address ending in
/api/, for examplehttps://galaxy-proxy.example.com/api/. If the proxy requires an API token, enter it in API Token. See Credentials. - Edit your organization, add the credential under Galaxy Credentials, and order it ahead of the default Ansible Galaxy entry. See Organizations.
- Remove the default Ansible Galaxy entry to force every request through the proxy.
Authentication
Authentication is optional and off by default:
- Set
GALAXY_API_TOKENto requireAuthorization: Token <token>on every Galaxy API and artifact request. Requests without the correct token receive HTTP401. - Leave it unset to accept all requests without authentication.
- The header is validated by the proxy and never forwarded upstream.
The /api/ root, /healthz, and /metrics endpoints do not require the token.