I’m building an execution environment in a CI pipeline and it’s unable to install certain collections. I’m receiving this error:
> ANSIBLE_GALAXY_DISABLE_GPG_VERIFY=1 ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path "/usr/share/ansible/collections"
Starting galaxy collection install process
Process install dependency map
[WARNING]: Skipping Galaxy server https://console.redhat.com/api/automation-hub/. Got an unexpected error when getting available versions of collection microsoft.ad: 'results'
[WARNING]: Skipping Galaxy server https://console.redhat.com/api/automation-hub/. Got an unexpected error when getting available versions of collection microsoft.sql: 'results'
[WARNING]: Skipping Galaxy server https://console.redhat.com/api/automation-hub/. Got an unexpected error when getting available versions of collection redhat.satellite_operations: 'results'
ERROR! Failed to resolve the requested dependencies map. Could not satisfy the following requirements:
* redhat.satellite_operations:3.0.0 (direct request)
The first 2 (microsoft.ad
and microsoft.sql
) are available publicly on Ansible Galaxy, whereas redhat.satellite_operations
is on Red Hat’s Hybrid Cloud Automation Hub and requires authentication, which I think is the issue. I generated a token for the AH here.
I’ve tried passing the token with ansible-galaxy collection install --token $TOKEN redhat.satellite_operations
, but no change. I’ve also tried including the token in the ansible.cfg
:
[galaxy]
server_list = automation_hub, galaxy_hub
[galaxy_server.automation_hub]
url=https://console.redhat.com/api/automation-hub/
token=token123
[galaxy_server.galaxy_hub]
url=https://galaxy.ansible.com/
Is the Automation Hub the issue? What’s the right way to authenticate with it? Or if not, how can I get this working?