Unable to manage roles in the new Galaxy-ng portal?

Now that Ansible Galaxy has switched over to the new “NG” release, I’m no longer able to see or manage any of my roles it seems…

I’ve logged in to galaxy.ansible.com, but I no longer see a “My Content” tab or equivalent.

Am I missing something?


I’m not 100% sure, but I think this is intentional in the sense that no role management UI was implemented. The role support that was added to galaxy_ng is bare minimum so that you can search for and install roles, and can publish new roles or new versions of existing roles (via the CLI tool), and that’s it (as far as I know). Or at least for now - I don’t know if there are plans to extend the roles functionality.

Would be great if someone from the Galaxy or Community teams could elaborate on this…

The documentation covers using the CLI to publish collections but I couldn’t find any mention of how to publish roles, I would have expected a CLI for roles to be like the collections one, but the publish option is missing?

ansible-galaxy role publish --help
usage: ansible-galaxy role [-h] ROLE_ACTION ...
ansible-galaxy role: error: argument ROLE_ACTION: invalid choice: 'publish' (choose from 'init', 'remove', 'delete', 'list', 'search', 'import', 'setup', 'info', 'install')
usage: ansible-galaxy [-h] [--version] [-v] TYPE ...

Perform various Role and Collection related operations.

positional arguments:
    collection   Manage an Ansible Galaxy collection.
    role         Manage an Ansible Galaxy role.

  --version      show program's version number, config file location, configured module search path, module location, executable
                 location and exit
  -h, --help     show this help message and exit
  -v, --verbose  Causes Ansible to print more debug messages. Adding multiple -v will increase the verbosity, the builtin plugins
                 currently evaluate up to -vvvvvv. A reasonable level to start is -vvv, connection debugging might require -vvvv.

This is with the latest version:

ansible-galaxy --version
ansible-galaxy [core 2.15.4]
  config file = /home/chris/workers/servers/ansible.cfg
  configured module search path = ['/home/chris/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/chris/.local/pipx/venvs/ansible/lib/python3.11/site-packages/ansible
  ansible collection location = /home/chris/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/chris/.local/bin/ansible-galaxy
  python version = 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] (/home/chris/.local/pipx/venvs/ansible/bin/python)
  jinja version = 3.1.2
  libyaml = True

Perhaps a newer version is required?

I think the ‘publish’ command for roles is called import: ansible-galaxy role import <github_user> <github_repo>.

Some documentation is here: Galaxy Developer Guide — Ansible Documentation (the role part is still optional in the command line, though I’d always put it there for clarity).


(IIRC roles were never hosted on Galaxy, they were always hosted on GitHub and Galaxy was more a directory of which roles are available via GitHub. That’s why publishing a role is called “importing” it, since it’s imported from GitHub. On the other hand, collections are uploaded to Galaxy as tarballs, whence that operation is called “publish”.)

1 Like

I got it working using the CLI! I had to get my API token using this guide, and then I was able to use ansible-galaxy import idolize ansible-role-dotfiles-stow - thanks for the help!

1 Like

11 posts were split to a new topic: Regex bug in galaxy-importer

Are there any plans to implement the “old” Galaxy import function in the UI?


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.