ansible-lint
ansible-lint copied to clipboard
github action: the role ansible-lint is supposed to test was not found
Summary
I have repository containing an ansible role. When I enable ansible-lint github action, using the documented ansible-lint file, this results in an error: the role was not found.
Issue Type
- Bug Report
OS / ENVIRONMENT
ansible-lint version: 6.17.2
This is run on github ci, using github workflows
name: ansible-lint
on: [push, pull_request]
jobs:
build:
name: Ansible Lint # Naming the build is important to use it as a status check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ansible-lint
uses: ansible/ansible-lint@v6
STEPS TO REPRODUCE
create a github action, following the documentation here: https://ansible.readthedocs.io/projects/lint/installing/#installing-from-source-code
name: ansible-lint
on: [push, pull_request]
jobs:
build:
name: Ansible Lint # Naming the build is important to use it as a status check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ansible-lint
uses: ansible/ansible-lint@v6
Desired Behavior
The ansible lint action as document should just work.
Actual Behavior
WARNING Listing 1 violation(s) that are fatal
syntax-check[specific]: the role 'ansible-role-vaultwarden' was not found in /home/runner/work/ansible-role-vaultwarden/ansible-role-vaultwarden/tests/roles:/home/runner/.cache/ansible-compat/d4577d/roles:/home/runner/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/runner/work/ansible-role-vaultwarden/ansible-role-vaultwarden/tests
tests/test.yml:8:7
Error: the role 'ansible-role-vaultwarden' was not found in /home/runner/work/ansible-role-vaultwarden/ansible-role-vaultwarden/tests/roles:/home/runner/.cache/ansible-compat/d4577d/roles:/home/runner/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/runner/work/ansible-role-vaultwarden/ansible-role-vaultwarden/tests
Rule Violation Summary
count tag profile rule associated tags
1 syntax-check[specific] min core, unskippable
Failed: 1 failure(s), 0 warning(s) o