question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installing roles with dashes in the name is broken

See original GitHub issue

Bug 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:closed
  • Created 5 years ago
  • Comments:33 (16 by maintainers)

github_iconTop GitHub Comments

5reactions
chouseknechtcommented, Jul 7, 2018

@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 ‘_’.

4reactions
elliotweisercommented, Jul 1, 2018
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found