Galaxy: ansible galaxy project naming

Created on 9 Jul 2018  路  7Comments  路  Source: ansible/galaxy

Bug Report

SUMMARY

With the current changes from #779 and #820 I'll have now a follow up problem:
we used to maintain our github stuff with:

  • github repository name: ansible-role-mycooltool
  • galaxy name: name-space.mycooltool

After changing and applying #820 we now have the

  • galaxy name: name_space.ansible_role_mycooltool and have no possibility to change that?
STEPS TO REPRODUCE
  1. create namespace
  2. create github role ansible-role-my-cool-tool
  3. import that in ansible galaxy
  4. wonder about name_space.ansible_role_my_cool_tool
EXPECTED RESULTS

First: I don't get which namespace is to use now.
name_space or name-space for the existing project.

ansible-galaxy install while-true-do.my-cool-tool

or

ansible-galaxy install while_true_do.my_cool_tool
ACTUAL RESULTS
ansible-galaxy install while_true_do.ansible_role_my_cool_tool
typquestion

Most helpful comment

Your namespace is donvipre, which exists, but has no content associated with it.

If you start adding repositories to your namespace, you'll see, as the documentation states, repository and role names will get '-' converted to '_'. Using your example, ansible-role-my-cool-tool will get converted to ansible_role_my_cool_tool.

If you want to alter the name, to just my_coole_tool, you can set the galaxy_ino.role_name value in meta/main.yml.

All 7 comments

Your namespace is donvipre, which exists, but has no content associated with it.

If you start adding repositories to your namespace, you'll see, as the documentation states, repository and role names will get '-' converted to '_'. Using your example, ansible-role-my-cool-tool will get converted to ansible_role_my_cool_tool.

If you want to alter the name, to just my_coole_tool, you can set the galaxy_ino.role_name value in meta/main.yml.

Thank you, I wasn't aware of the galaxy_info.role_name parameter
For the namespace while-true-do.
How do I get it converted completely to while_true_do?
Removing it and readding it?

Only an admin can delete a namespace. If there is an existing namespace in Galaxy that you want converted from '-' to '_', we can do it for you. Just let me know the namespace name.

For new users, a namespace is automatically created in Galaxy for the GitHub username, on the first login, and '-' is automatically converted to '_'.

Didn't realize that while-true-do is actually the namespace. Looks like all of your roles have a '-', and nothing got renamed with '_'. There was a bug that caused some roles to get renamed.

If there is something you want renamed. Just let us know. We're happy to help.

@chouseknecht : Could you please rename while-true-do to while_true_do?
This would be great help!

@chouseknecht Thanks a lot for your suggestion. Would be awesome, if we can get this done :+1:

@donvipre @daniel-wtd

Renamed while-true-do to while_true_do, as requested. Apologies for not getting back to this.

Tested an install of one of your roles, see output below. You'll need to update your role dependencies with the new namespace.

ansible-galaxy install while_true_do.ansible
- downloading role 'ansible', owned by while_true_do
- downloading role from https://github.com/while-true-do/ansible-role-ansible/archive/master.tar.gz
- extracting while_true_do.ansible to /Users/chouseknecht/roles/while_true_do.ansible
- while_true_do.ansible (master) was installed successfully
- adding dependency: while-true-do.repo-epel
- downloading role 'repo-epel', owned by while-true-do
 [WARNING]: - while-true-do.repo-epel was NOT installed successfully: - sorry, while-true-do.repo-epel was not found on https://galaxy.ansible.com.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

chouseknecht picture chouseknecht  路  6Comments

trishnaguha picture trishnaguha  路  7Comments

dallinb picture dallinb  路  5Comments

robertdebock picture robertdebock  路  5Comments

robertdebock picture robertdebock  路  7Comments