The previous behavior of galaxy was very neat and intuitive.
However, It seems that there is no option to change the ansible role name anymore.
It would be awesome to have an option to modify the role name.
The reason why it may be needed is simple: the github account can contain projects that are not ansible roles, therefore it would be logical to have role projects' names on GitHub as the following example: ansible-myrole instead just myrole.
However, with the new galaxy update, the ansible- portion of the role name is not being stripped anymore and there is no way to modify it except changing the github repo name, which is not really what the one may want.
Considering the above, it would be great to have the option to correct name in galaxy, for example to be able to remove the ansible- portion from the newly imported role's name.
Ideal would be to keep the old behavior of automatic stripping the ansible- part from the beginning of the role repo name.
@drew-kun
You can set galaxy_info.role_name in meta/main.yml. For more details, view Role Names in our docs.
Thank you for your fast response and the solution.
I have also worked around it as following:
1 - create github repo named myrole
2 - add role to ansible-galaxy
3 - rename the original github repo to ansible-myrole
Ugly, but works... kinda.
Renaming the repo after import is less than ideal. Next time, please give role_name a try.
Closing this issue, as it seems to be solved. Please open a new issue, if you have additional questions.
Thanks, it works!
Most helpful comment
@drew-kun
You can set galaxy_info.role_name in
meta/main.yml. For more details, view Role Names in our docs.