Description
Summary
According to the Collection structure
chapter of the docs:
Role names are now limited to contain only lowercase alphanumeric characters, plus _ and start with an alpha character.
However, I've observed that role names can start with an underscore _
character without causing any issues. I have tried this with Ansible versions 2.9, 2.10, 2.11, 2.12, 2.13, 2.14, 2,15, 2.16 and 2.17, and none of them had problems consuming a role with such a name. Ansible Galaxy also imports the role without any issues.
I understand that a role name like this might not be aesthetically pleasing, but there is a good reason for it. We recently added an Ansible role for common shared tasks to the [prometheus ansible collection](https://github.com/prometheus-community/ansible). The role is named _common
(fqcn prometheus.prometheus._common
) to distinguish it from the other roles in the collection, as it is an internal role that's only supposed to be used by the other roles and not directly by a user.
Related: ansible/ansible-lint#4370
Issue Type
Bug Report
Component Name
core
Ansible Version
N/A
Configuration
N/A
OS / Environment
N/A
Steps to Reproduce
N/A
Expected Results
N/A
Actual Results
N/A
Code of Conduct
- I agree to follow the Ansible Code of Conduct
Metadata
Metadata
Assignees
Type
Projects
Status
🆕 Triage
Activity