I'm building an execution environment and it fails running ansible-galaxy collection install
. I get this error:
ERROR! Error when getting collection version metadata for redhat.satellite_operations:3.0.0 from automation_hub (/) (HTTP Code: 401, Message: Invalid JWT token - 'exp' claim expired at Fri, 15 Nov 2024 21:50:24 GMT Code: Unknown)
This is the command:
ANSIBLE_GALAXY_DISABLE_GPG_VERIFY=1 ansible-galaxy collection install --pre --verbose -r requirements.yml --collections-path "/usr/share/ansible/collections"
There are a number of collections and this step takes quite long (fails at ~17min). I think this is the reason for the error. When I limit the number of collections to 4 or so, it runs ~12min and completes successfully.
I'm trying to figure out a way around it. I tried adding --timeout 1000
to ansible-galaxy
, but no luck.
Is there any way to prevent the JWT from expiring when the command takes too long to run? Or another way to fix this issue?