ansible-role-interfaces icon indicating copy to clipboard operation
ansible-role-interfaces copied to clipboard

Ansible Galaxy imports failing

Open markgoddard opened this issue 1 year ago • 7 comments

We have an action to automatically import this role, but it seems to be failing: https://github.com/michaelrigart/ansible-role-interfaces/actions/workflows/publish-role.yml

markgoddard avatar Apr 13 '23 10:04 markgoddard

Is this because GALAXY_API_KEY secret is missing?

cityofships avatar Jul 25 '23 11:07 cityofships

Yes, I expect so. @michaelrigart , are you able to set this secret for the repo?

markgoddard avatar Jul 25 '23 11:07 markgoddard

@markgoddard : I just set the Ansible API key as repo secret, but the action still seems to fail.

Could this be due to the capitalization of my Galaxy username MichaelRigart vs small-caps on github (michaelrigart), since the command it runs is: ansible-galaxy import michaelrigart xyz?

michaelrigart avatar Jul 26 '23 06:07 michaelrigart

@markgoddard : I just set the Ansible API key as repo secret, but the action still seems to fail.

Could this be due to the capitalization of my Galaxy username MichaelRigart vs small-caps on github (michaelrigart), since the command it runs is: ansible-galaxy import michaelrigart xyz?

Yes, that's the reason - gives 500 if tried from command line too.

cityofships avatar Jul 26 '23 07:07 cityofships

It seems that I can't change the namespace on Galaxy neither.

michaelrigart avatar Jul 26 '23 07:07 michaelrigart

I have created an issue on the Galaxy GH repo. Hopefully it can be resolved: https://github.com/ansible/galaxy/issues/3217

michaelrigart avatar Jul 31 '23 08:07 michaelrigart

Since the roll out of Galaxy NG there is no UI for importing roles, and when I tried to do it manually it took a few goes to make it work.

First, you need to use the capitalised MichaelRigart namespace. Next, you need to specify the tag via --branch, otherwise it uploads the master branch.

ansible-galaxy role import MichaelRigart ansible-role-interfaces  --api-key <key> --branch v1.14.4

I've updated the GitHub actions publish workflow to do this, but unfortunately it failed with a 403. @michaelrigart perhaps you need to regenerate a new API token for NG galaxy?

markgoddard avatar Oct 20 '23 10:10 markgoddard