Skip to Content
User GuidesAscender RegistryConsuming the Registry

Consuming the Registry

Once your registry is populated, you point your tooling at it instead of (or in addition to) public Ansible Galaxy and Docker Hub. This guide shows how to configure clients to install and publish collections and to pull and push container images with Ascender Registry.

Throughout this guide, replace https://registry.example.com with your registry's Base URL (configured in General settings).

Ansible collections

The registry exposes a Galaxy-compatible API (v3) under the /api/ root, so the standard ansible-galaxy client works without modification. Configure clients with the API root URL ending in /api/; the client reads the available API versions from it.

Configure ansible.cfg

Add the registry as a Galaxy server in your ansible.cfg:

[galaxy] server_list = ascender_registry [galaxy_server.ascender_registry] url = https://registry.example.com/api/

If the registry requires an API token, include it so the client can authenticate:

[galaxy_server.ascender_registry] url = https://registry.example.com/api/ token = your-galaxy-token

A token is required as soon as your administrator has set a Galaxy Token in General settings or any user has a personal Galaxy Token on their profile. You can use either the shared token from General settings or your own personal token.

Note

The token is sent as an Authorization: Token <token> header. If no token is configured on the server, you can omit the token line.

The client also sends the token when it downloads the collection archive, and the registry requires it there too unless the administrator has enabled Allow Anonymous Artifact Downloads. Installing by direct URL (ansible-galaxy collection install https://.../download/ns-name-1.0.0.tar.gz) sends no token, so it only works on a token-protected registry when that setting is on.

Browsing the API

Tooling written for Automation Hub can enumerate the registry through the same Galaxy v3 index endpoints that Automation Hub exposes. Each list is paginated pulp-style with limit (default 10, maximum 100) and offset, and returns meta.count, links, and data:

EndpointPurposeFilters
GET /api/API root. Lists available_versions and advertises the registry release as server_version.
GET /api/v3/collections/ (also /api/v3/plugin/ansible/content/published/collections/index/)Flat index of every collection with its highest_version, versions_url, timestamps, and download_count (downloads from this registry, all versions).namespace, name
GET /api/v3/namespaces/Index of all namespaces.name, company, keywords
GET /api/v3/namespaces/<name>/One namespace.

Every endpoint is also available under the /api/galaxy/ root, and all honor the token requirement described above.

Install collections

Install a specific collection from the registry:

ansible-galaxy collection install community.general

Or install everything listed in a requirements.yml:

# requirements.yml collections: - name: community.general version: ">=1.0.0" - name: ansible.posix
ansible-galaxy collection install -r requirements.yml

Because the registry rewrites artifact download links to use your Base URL, the collection archives are served directly from your registry, not from upstream Galaxy.

Publish collections

You can publish a collection you built with ansible-galaxy collection build directly to the registry:

ansible-galaxy collection publish ./my_namespace-my_collection-1.0.0.tar.gz --api-key your-galaxy-token

Publishing has the following requirements:

  • At least one API token must be configured on the registry (the shared Galaxy Token or a personal token). If none is configured, publishing is disabled.
  • The request must carry a token. A personal token works only when its owner has the System Administrator or Create Collections permission (see Permissions). The shared Galaxy Token can always publish.
  • The target namespace must already exist as a custom namespace. Namespaces created by repository syncs cannot be published to.
  • The version must not already exist in the registry.

Published collections appear on the Collections page as custom collections.

Use the registry from Ascender

To have Ascender install collections from the registry when it runs project updates:

  1. In Ascender, create a credential of type Ansible Galaxy/Automation Hub API Token. Set Galaxy Server URL to the same URL you use for url in ansible.cfg above, and set API Token to a registry token if the registry requires one. See Credentials.
  2. Edit your organization, add the credential under Galaxy Credentials, and order it ahead of the default Ansible Galaxy entry. See Organizations.
  3. Optionally remove the default Ansible Galaxy entry so that every collection comes from the registry.

Projects that include a collections/requirements.yml file then install their collections from the registry. See Ansible Galaxy support.

Verifying availability

If a collection fails to install:

  • Confirm it appears on the Collections page.
  • If it does not, check the relevant repository and run the collection sync task.
  • Confirm your url ends with /api/ and your token (if required) is correct.

Container images

The registry implements the Docker Registry v2 / OCI protocol, so docker and podman work against it directly. Authentication uses your registry username and password (the same credentials you use to sign in to the web interface).

In the examples below, registry.example.com is the host portion of your registry (without the https:// scheme).

Sign in

docker login registry.example.com # Username: your-registry-username # Password: your-registry-password

podman login registry.example.com works the same way.

Pull an image

Pull an image stored in the registry (see Containers for how repositories and tags are created):

docker pull registry.example.com/myapp:latest

Push an image

Tag your local image with the registry host and the container repository name, then push:

docker tag myapp:latest registry.example.com/myapp:latest docker push registry.example.com/myapp:latest

The repository name (myapp above) must match the Container Name you configured on the Containers page.

Mirrored images

If a container repository is configured to mirror an upstream image, you do not push to it manually. The registry pulls the upstream image on its schedule (or when you trigger sync now). You then pull the mirrored copy from the registry as shown above. See Mirroring an upstream image.

Troubleshooting

SymptomLikely causeFix
ansible-galaxy returns 401 or 403Token required or wrongSet the correct token in ansible.cfg; confirm the token in General settings or on your profile.
Collection not foundNot yet syncedCheck the repository and run the sync task.
Download URLs point at galaxy.ansible.comBase URL not setSet Base URL in General settings.
docker login failsWrong credentialsUse your registry web login username and password.
docker pull or docker push returns 403License invalid or missingConfirm a valid license in License.
docker push rejected for unknown repositoryContainer repository not definedCreate the container on the Containers page first.