Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

internal-error: the role 'role-xxx' was not found #55

Closed
papanito opened this issue Dec 20, 2021 · 3 comments
Closed

internal-error: the role 'role-xxx' was not found #55

papanito opened this issue Dec 20, 2021 · 3 comments

Comments

@papanito
Copy link

I use this action to lint stand-alone role and respective playbooks. The linting of the playbooks fails, cause it does not find the role. Hence I provide ANSIBLE_ROLES_PATH which seems not to be considered

jobs:
  build:
    name: Ansible lint
    runs-on: ubuntu-latest
    env:
      ANSIBLE_ROLES_PATH: ".:.."
    steps:
    - uses: actions/checkout@v2
    - name: Lint Ansible Playbook
      uses: ansible/ansible-lint-action@master
      with:
        targets: "**/*.yml"
        override-deps: |
          ansible-lint==5.3.1

This still does not work

+ ansible-lint -v --force-color defaults/main.yml handlers/main.yml meta/main.yml playbook.yml tasks/journald.yml tasks/main.yml tasks/tls.yml tasks/vars_debian_rhel.yml tests/logz.io.yml tests/newrelic.com.yml vars/main.yml
INFO     Using /github/home/.cache/ansible-lint/70343f/roles/papanito.rsyslog symlink to current repository in order to enable Ansible to find the role using its expected full name.
INFO     Added ANSIBLE_ROLES_PATH=.:..:/github/home/.cache/ansible-lint/70343f/roles
INFO     Using /github/home/.cache/ansible-lint/70343f/roles/papanito.rsyslog symlink to current repository in order to enable Ansible to find the role using its expected full name.
INFO     Added ANSIBLE_ROLES_PATH=.:..:/github/home/.cache/ansible-lint/70343f/roles:/github/home/.cache/ansible-lint/70343f/roles
WARNING  Overriding detected file kind 'yaml' with 'playbook' for given positional argument: tests/logz.io.yml
WARNING  Overriding detected file kind 'yaml' with 'playbook' for given positional argument: tests/newrelic.com.yml
INFO     Executing syntax check on playbook.yml (0.55s)
INFO     Executing syntax check on tests/logz.io.yml (0.56s)
INFO     Executing syntax check on tests/newrelic.com.yml (0.55s)
WARNING  Listing 3 violation(s) that are fatal
internal-error: the role 'ansible-role-rsyslog' was not found in /github/workspace/roles:/github/workspace:/github:/github/home/.cache/ansible-lint/70343f/roles:/github/home/.cache/ansible-lint/70343f/roles:/github/workspace
playbook.yml:14:7 [WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
ERROR! the role 'ansible-role-rsyslog' was not found in /github/workspace/roles:/github/workspace:/github:/github/home/.cache/ansible-lint/70343f/roles:/github/home/.cache/ansible-lint/70343f/roles:/github/workspace

The error appears to be in '/github/workspace/playbook.yml': line 14, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  roles:
    - ansible-role-rsyslog
      ^ here

On my local machine - using the same ansible-lint version, I don't have this issue:

ANSIBLE_ROLES_PATH=..:. ansible-lint -v --force-color defaults/main.yml handlers/main.yml meta/main.yml playbook.yml tasks/journald.yml tasks/main.yml tasks/tls.yml tasks/vars_debian_rhel.yml tests/logz.io.yml
INFO     Using /home/aedu/.cache/ansible-lint/124697/roles/papanito.rsyslog symlink to current repository in order to enable Ansible to find the role using its expected full name.
INFO     Added ANSIBLE_ROLES_PATH=..:.:/home/aedu/.cache/ansible-lint/124697/roles
INFO     Using /home/aedu/.cache/ansible-lint/124697/roles/papanito.rsyslog symlink to current repository in order to enable Ansible to find the role using its expected full name.
INFO     Added ANSIBLE_ROLES_PATH=..:.:/home/aedu/.cache/ansible-lint/124697/roles:/home/aedu/.cache/ansible-lint/124697/roles
WARNING  Overriding detected file kind 'yaml' with 'playbook' for given positional argument: tests/logz.io.yml
INFO     Executing syntax check on playbook.yml (2.36s)
INFO     Executing syntax check on tests/logz.io.yml (2.41s)
@cmagone
Copy link

cmagone commented Jan 21, 2022

I have this issue as well if I try to use an ansible-lint version greater than 5.3.x

@mhdan
Copy link

mhdan commented Feb 2, 2022

I have this issue as well if I try to use an ansible-lint version greater than 5.3.x

any updates about this issue?
I have this problem too. :(

@ssbarnea
Copy link
Member

Please try v6, we just release it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants