Role names should be able to begin with a underscore. #2035
Labels
bug
Something isn't working
needs_triage
Needs a first human triage before being processed.
new_contributor
This PR is the first contribution by a new community member.
Summary
According to the
Collection structure
chapter of the docs: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
(fqcnprometheus.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
The text was updated successfully, but these errors were encountered: