You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
The text was updated successfully, but these errors were encountered:
ansible-lint
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.11.9/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.9/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.9/x64/lib
WARNING Listing 4 violation(s) that are fatal
yaml[trailing-spaces]: Trailing spaces
.github/workflows/molecule.yml:1
yaml[indentation]: Wrong indentation: expected at least 3
molecule/default/verify.yml:8
name[casing]: All names should start with an uppercase letter.
tasks/version.yml:38 Task/Handler: print latest vaultwarden webvault release
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
JensTimmerman
changed the title
the role ansible-lint is supposed to test was not found
github action: the role ansible-lint is supposed to test was not found
Jul 6, 2024
One fix could be to use the role's fully qualified role name (FQRN) instead of the role's name within the tests/test.yml playbook. Underneath the covers, ansible-compat (which ansible-lint has as a dependency) will learn to associate that role with the local repository's path. You can see how this would look here, and the respective action run here.
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
OS / ENVIRONMENT
ansible-lint version: 6.17.2
This is run on github ci, using github workflows
STEPS TO REPRODUCE
create a github action, following the documentation here:
https://ansible.readthedocs.io/projects/lint/installing/#installing-from-source-code
Desired Behavior
The ansible lint action as document should just work.
Actual Behavior
The text was updated successfully, but these errors were encountered: