Issue with access to some of my ansible roles at galaxy-ng [need help from admin/support]

Hello everyone.

I have been using Ansible enthusiastically for years and am a great friend of open-source and therefore also try to publish my Ansible code.

However, since the launch of galaxy-ng I still have unsolved problems when publishing my Ansible roles and need help. I will be at CfgMgmntCamp and we can discuss this IRL.

Since I was asked to make a forum post about my problems, I’ll do that now…

My Github User is DO1JLR. I publish most of my ansible roles and collections at github.com/roles-ansible/.

At galaxy-ng I should own these namespaces:

I am unable to opt-out of ansible-lightspeed at the ansible-archive and roles-ansible namespace. (Error 400 - : The server was unable to complete your request.)

I am unable to delete or archive any ansible role I ever published at any namespace.

I am unable to publish any role to any namespace except the roles-ansible. The ansible role I tried are all in the github.com/roles-ansible/ Github organisation.

What do I want?

I want to delete or mark all ansible roles as old/archived in all namespaces except the l3d namespace. And I want to publish all my ansible roles from the roles-ansible github organisation to the l3d namespace, but I am unable to do so.

Instead I can publish my ansible roles from the roles-ansible github organisation to the roles-ansible role namespace.


And ansible collections?
For ansible collections this is working, see Collection Namespace L3D.
That’s why I am thinking about archiving all my ansible roles and only publish ansible collections. But since I am unable to archive/delete my own ansible roles, thats not such a good idea either :disappointed_relieved:


I am looking forward speaking with one of you guys at CfgMgmntCamp. Maybe we can figure out a soluting when we see us in real life. :wave:

@L3D Thanks for all the details.
Someone will get back to you in the next few days

1 Like

@PartnerEngTeam Can you please look at the Galaxy issue that @L3D is reporting, Thanks

Clearly something changed.

I tried to import a new ansible role and it appeared in the l3d namespace at l3d.cwtv_telegram_jitsi_bot.

I also noticed, my github action stoped working:

See code:

 Error running Ansible command: Command '['/usr/local/bin/ansible-galaxy', 'role', 'import', '-vvv', '--api-key', '***', '--branch', 'main', 'roles-ansible', 'ansible_role_cwtv_telegram_jitsi_bot']' returned non-zero exit status 1.

ansible-galaxy [core 2.18.1]
  config file = None
  configured module search path = ['/github/home/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.13/site-packages/ansible
  ansible collection location = /github/home/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible-galaxy
  python version = 3.13.1 (main, Jan 14 2025, 05:25:12) [GCC 12.2.0] (/usr/local/bin/python3.13)
  jinja version = 3.1.5
  libyaml = True
No config file found; using defaults
Created /github/home/.ansible/galaxy_token

ERROR! Error when finding available api versions from default (https://galaxy.ansible.com) (HTTP Code: 401, Message: Unauthorized)

Details: v1.0.0 · roles-ansible/ansible_role_cwtv_telegram_jitsi_bot@06c4edc · GitHub

Github Action Source; GitHub - ansible-actions/ansible-galaxy-action: This Action will import ansible roles on galaxy-ng

Looks my galaxy token expired. Or someone fixed stuff at galaxy-ng. I created a new token and the pipeline is working again.

But I still want to know how to controll the namespace and how to delete, archive and upload roles without getting surprised about the role-namespace.

Hi @L3D . I’m looking into this now. So to be clear, you want all the other namespaces and roles delete except l3d?

And today, you can only upload to the roles-ansible namespace?
I can start deleting everything but those two (so we have a working one, and a nonworking one). And then debug why you can’t upload to the l3d namespace. Does this sound correct?

1 Like

Hey @samccann, thanks for looking into this.

Are there any better options than deleting? I am thinking about users who have some of my roles in their requirements.yml file and pulling/updating the role will no longer works since it has been deleted (and is now in the l3d namespace).
If there is no better way, then I guess deleting it is.

I tested uploading roles and am happy to report that updating my l3d.test test role worked :smile:

My next step will be to clean up all my ansible roles and have them point to the l3d role namespace :sweat_smile:

Is there any way I can delete roles myself?

I ‘think’ I can move roles from one namespace to another. I can give that a try if you let me know which batch of roles you want moved to the l3d role namespace.

As for deleting your own roles, I think you should be able to. See the role deletion docs and let us know how it goes.

1 Like

Thanks a lot for the offer @samccann

The role deletion helped a lot.

It did not worked with the ansible-galaxy tooling:

 $ ansible-galaxy role delete --token <hidden> roles-ansible packages
Role roles-ansible.packages not found. Maybe it was deleted previously?

But with the HTTP Client:

curl "https://galaxy.ansible.com/api/v1/roles/?owner__username=roles-ansible&name=packages" | jq
[...]
"id": 32281
[...]

 curl -X DELETE -H "Authorization: token <hidden>" https://galaxy.ansible.com/api/v1/roles/32281/
curl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)

The response during deleting was not that helpfull, but it worked.

The result is, what I wanted:


It will take some time until I fixed all my ansible roles, but now I am able to do that. Thanks a lot :heart:

1 Like