0

The latest Galaxy Developer Guide provides "no" information on how a role can be imported in a non-user namespace. There is no mention of the word namespace on that page.

So roles I import in automated fashion for example via GitHub actions or manually using CLI ansible-galaxy role import will end-up in my default user namespace onknows.

My conclusion now is that if you want roles imported in a non-default, non-user namespace but rather an organization namespace this can only be done by manually uploading the role using the Ansible Galaxy web interface.

With other words, it is not possible to configure / specify a namespace when using Ansible Galaxy CLI importer.

Is this correct? There is no automation possible when using non-default non-user namespace?

onknows
  • 6,151
  • 12
  • 65
  • 109
  • I am not sure if I got your questions fully ... According the documentation [Installing content](https://galaxy.ansible.com/docs/using/installing.html), it is possible to just run `ansible-galaxy` with the `-p ROLES_PATH` or `--roles-path=ROLES_PATH` option to install it under i.e. `/etc/ansible/...`. [Ansible Galaxy Roles: Install in to a specific directory](https://stackoverflow.com/questions/22201306/) – U880D Jan 16 '22 at 08:02
  • 1
    If you want your role to have a namespace, you need to make it part of a collection and use it from there. See https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html. Collections can be used locally, installed from git scm or from galaxy. They have a mandatory namespace and name which will be used where ever you install them. – Zeitounator Jan 16 '22 at 16:35

0 Answers0