Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

role-name doesn't recognize roles in subpaths #2502

Closed
MarkusTeufelberger opened this issue Sep 27, 2022 · 0 comments · Fixed by #2532
Closed

role-name doesn't recognize roles in subpaths #2502

MarkusTeufelberger opened this issue Sep 27, 2022 · 0 comments · Fixed by #2532
Labels

Comments

@MarkusTeufelberger
Copy link
Contributor

Summary

The role-name rule (and the schema rule too which also validates role names these days!) don't trigger on a role that's in a subfolder.

Issue Type
  • Bug Report
Ansible and Ansible Lint details
ansible --version
ansible [core 2.13.4]
  config file = /home/[snip]/ansible.cfg
  configured module search path = ['/home/[snip]/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/[snip]/collections
  executable location = /home/[snip]/.local/bin/ansible
  python version = 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0]
  jinja version = 3.0.3
  libyaml = True

ansible-lint --version
ansible-lint --version
Command 'ansible-lint' not found, but can be installed with:
sudo apt install ansible-lint

(ansible-lint 6.7.0 is run via pre-commit, not installed on the host...)

  • ansible installation method: OS package
  • ansible-lint installation method: pip (in pre-commit venv)
OS / ENVIRONMENT

Xubuntu 22.04

STEPS TO REPRODUCE

Consider the following playbook:

---
- name: Testcase
  hosts: localhost
  roles:
    - valid_prefix/this-should-trigger  # <-- no error here!
    - invalid-prefix/this-should-trigger-too  # <-- only complains about "invalid-prefix"
Desired Behavior

At least role-name and probably also the schema rule should trigger on this.

Actual Behavior

Please give some details of what is actually happening.
Include a minimum complete verifiable example with:

  • playbook
  • output of running ansible-lint
  • if you're getting a stack trace, output of
    ansible-playbook --syntax-check playbook

@MarkusTeufelberger MarkusTeufelberger added bug new Triage required labels Sep 27, 2022
@ssbarnea ssbarnea removed the new Triage required label Oct 1, 2022
ssbarnea added a commit to ssbarnea/ansible-lint that referenced this issue Oct 1, 2022
ssbarnea added a commit to ssbarnea/ansible-lint that referenced this issue Oct 31, 2022
ssbarnea added a commit to ssbarnea/ansible-lint that referenced this issue Oct 31, 2022
ssbarnea added a commit to ssbarnea/ansible-lint that referenced this issue Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants