Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible galaxy project naming #854

Closed
donvipre opened this issue Jul 9, 2018 · 7 comments
Closed

ansible galaxy project naming #854

donvipre opened this issue Jul 9, 2018 · 7 comments
Assignees

Comments

@donvipre
Copy link

donvipre commented Jul 9, 2018

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
@chouseknecht
Copy link
Contributor

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.

@donvipre
Copy link
Author

donvipre commented Jul 9, 2018

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?

@chouseknecht
Copy link
Contributor

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 '_'.

@chouseknecht
Copy link
Contributor

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.

@donvipre
Copy link
Author

donvipre commented Jul 16, 2018

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

@dschier-wtd
Copy link

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

@chouseknecht
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants