Installing roles with dashes in the name is broken
See original GitHub issueBug Report
SUMMARY
I used to be able to install roles with dashes in the name, e.g. elliotweiser.osx-command-line-tools. I can no longer do so. It appears that underscores are required. This breaks roles and playbooks that pull in such roles as dependencies.
Example: https://travis-ci.org/geerlingguy/mac-dev-playbook/builds/398684539
STEPS TO REPRODUCE
pip install ansible # occurs w/ 2.6 and 2.5
ansible-galaxy install elliotweiser.osx-command-line-tools
EXPECTED RESULTS
The role should be successfully downloaded.
ACTUAL RESULTS
$ ansible-galaxy install elliotweiser.osx-command-line-tools
- downloading role 'osx-command-line-tools', owned by elliotweiser
[WARNING]: - elliotweiser.osx-command-line-tools was NOT installed successfully: - sorry, elliotweiser.osx-command-line-tools was not
found on https://galaxy.ansible.com.
ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.
It appears the role can only be installed when using underscores instead of dashes:
$ ansible-galaxy install elliotweiser.osx_command_line_tools
- downloading role 'osx_command_line_tools', owned by elliotweiser
- downloading role from https://github.com/elliotweiser/ansible-osx-command-line-tools/archive/2.1.0.tar.gz
- extracting elliotweiser.osx_command_line_tools to /Users/elliotweiser/git/github/elliotweiser/elliotweiser.osx_command_line_tools
- elliotweiser.osx_command_line_tools (2.1.0) was installed successfully
I’m not sure if this was change in behavior was intentional, but it may have been an oversight.
Issue Analytics
- State:
- Created 5 years ago
- Comments:33 (16 by maintainers)
Top Results From Across the Web
Ansible Naming Rules for Roles and Collections (dash ...
You're asking a number of somewhat related questions, so I'll try to break them apart and address each one individually.
Read more >Grant users access to mysql with a dash in the database name
Unfortunately, I have a database name with a dash in it. How do I grant access to that database as mysql reports a...
Read more >Troubleshooting App Deployment Errors - Dash Python
This troubleshooting guide describes errors that you may encounter when deploying apps to Dash Enterprise as well as steps to resolve them.
Read more >Install and Configure WSUS on Windows Server 2019
Install and configure WSUS Select Role based or feature based installation. On the Server Selection page, verify the server name and click ...
Read more >How to force LaTeX not to break the line after a hyphen “-”?
You can then use new dashes to control breaking behaviour of words with dashes. ... use this (and replace museo with your font...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@paulfantom
That last one is fixed. It’s now ‘mysqld-exporter’.
Going forward, anything new will have ‘-’ converted to ‘_’.
If you want to alter the name (e.g., remove ‘ansible-’), then use the
role_name
attribute to set the name.Deleting a role and re-importing, or setting the
role_name
value, will update the name in the Galaxy database, and cause ‘-’ to be converted to ‘_’.Some additional irony…
This URL looks good 👍 https://galaxy.ansible.com/elliotweiser/osx-command-line-tools
This one, not so much… https://galaxy.ansible.com/elliotweiser/osx_command_line_tools